@chaibuilder/sdk 2.0.12 → 2.1.1

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,25 +1,26 @@
1
- import { registerChaiBlockSchema as m, StylesProp as u, registerChaiBlock as d } from "@chaibuilder/runtime";
2
- import { jsx as i, jsxs as b, Fragment as A } from "react/jsx-runtime";
3
- import * as f from "react";
4
- import { createElement as L } from "react";
5
- import { c as v, g as I } from "./Functions-BGzDsf1z.js";
6
- import { ButtonIcon as M, CodeIcon as H, HeadingIcon as z, TextIcon as q, CursorTextIcon as F, DividerHorizontalIcon as j, SketchLogoIcon as D, ImageIcon as E, Link1Icon as G, RowsIcon as U, ColumnsIcon as V, SpaceBetweenVerticallyIcon as O, VideoIcon as W, CheckboxIcon as X, InputIcon as T, 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 _ } from "lodash-es";
8
- import { FileCode as te, GlobeIcon as R, GroupIcon as le, Columns as oe, Rows as re } from "lucide-react";
9
- const C = ({ 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, ne = (e) => {
10
- const { blockProps: t, inBuilder: l, backgroundImage: r, children: o, tag: n = "div", styles: s } = e;
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
11
  let a = o;
12
- o || (a = /* @__PURE__ */ i(C, { inBuilder: l }));
12
+ o || (a = /* @__PURE__ */ i(L, { inBuilder: l }));
13
13
  let c = {};
14
- return r && (c = { backgroundImage: `url(${r})` }), f.createElement(n, { ...t, ...s, style: c }, a);
14
+ return n && (c = { backgroundImage: `url(${n})` }), g.createElement(r, { ...t, ...s, style: c }, a);
15
15
  }, ie = {
16
16
  type: "Box",
17
+ description: "Similar to a div or section elements in HTML",
17
18
  label: "Box",
18
19
  category: "core",
19
20
  group: "basic",
20
- ...m({
21
+ ...d({
21
22
  properties: {
22
- styles: u(""),
23
+ styles: p(""),
23
24
  backgroundImage: {
24
25
  type: "string",
25
26
  default: "",
@@ -54,36 +55,37 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
54
55
  }),
55
56
  canAcceptBlock: () => !0
56
57
  }, se = (e) => {
57
- const { blockProps: t, iconSize: l, icon: r, content: o, styles: n, children: s, iconPos: a, link: c, inBuilder: y } = e, g = r, h = s || /* @__PURE__ */ b(A, { children: [
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: [
58
59
  /* @__PURE__ */ i("span", { "data-ai-key": "content", children: o }),
59
- g && /* @__PURE__ */ i(
60
+ f && /* @__PURE__ */ i(
60
61
  "div",
61
62
  {
62
63
  style: { width: l + "px" },
63
64
  className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
64
- dangerouslySetInnerHTML: { __html: g }
65
+ dangerouslySetInnerHTML: { __html: f }
65
66
  }
66
67
  )
67
- ] }), p = L(
68
+ ] }), m = C(
68
69
  "button",
69
70
  {
70
71
  ...t,
71
- ...n,
72
+ ...r,
72
73
  type: "button",
73
74
  "aria-label": o
74
75
  },
75
76
  h
76
77
  );
77
- return w(k(c, "href")) ? p : y ? /* @__PURE__ */ i("span", { children: p }) : /* @__PURE__ */ i("a", { "aria-label": o, href: k(c, "href") || "/", target: k(c, "target", "_self"), children: p });
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 });
78
79
  }, ae = {
79
80
  type: "Button",
81
+ description: "similar to a button element in HTML",
80
82
  label: "Button",
81
83
  category: "core",
82
84
  icon: M,
83
85
  group: "basic",
84
- ...m({
86
+ ...d({
85
87
  properties: {
86
- styles: u("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
88
+ styles: p("text-primary-foreground bg-primary px-4 py-2 rounded-lg flex items-center"),
87
89
  content: {
88
90
  type: "string",
89
91
  title: "Button label",
@@ -127,27 +129,28 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
127
129
  i18nProps: ["content"],
128
130
  aiProps: ["content"]
129
131
  }, ce = (e) => {
130
- const { blockProps: t, styles: l, htmlCode: r, inBuilder: o } = e;
132
+ const { blockProps: t, styles: l, htmlCode: n, inBuilder: o } = e;
131
133
  return o ? /* @__PURE__ */ b("div", { className: "relative", children: [
132
134
  o ? /* @__PURE__ */ i("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
133
- f.createElement("div", {
135
+ g.createElement("div", {
134
136
  ...l,
135
- dangerouslySetInnerHTML: { __html: r.replace(/<script.*?>.*?<\/script>/g, "") }
137
+ dangerouslySetInnerHTML: { __html: n.replace(/<script.*?>.*?<\/script>/g, "") }
136
138
  })
137
- ] }) : f.createElement("div", {
139
+ ] }) : g.createElement("div", {
138
140
  ...t,
139
141
  ...l,
140
- dangerouslySetInnerHTML: { __html: r }
142
+ dangerouslySetInnerHTML: { __html: n }
141
143
  });
142
144
  }, pe = {
143
145
  type: "CustomHTML",
144
- label: "web_blocks.custom_html",
146
+ description: "similar to a div or section elements in HTML",
147
+ label: "Custom HTML",
145
148
  category: "core",
146
- icon: H,
149
+ icon: A,
147
150
  group: "advanced",
148
- ...m({
151
+ ...d({
149
152
  properties: {
150
- styles: u(""),
153
+ styles: p(""),
151
154
  htmlCode: {
152
155
  type: "string",
153
156
  default: "<div><p>Enter your HTML code here...</p></div>",
@@ -156,17 +159,18 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
156
159
  }
157
160
  })
158
161
  }, ue = (e) => {
159
- const { blockProps: t, styles: l, backgroundImage: r } = e;
162
+ const { blockProps: t, styles: l, backgroundImage: n } = e;
160
163
  let o = {};
161
- return r && (o = { backgroundImage: `url(${r})` }), f.createElement("div", { ...t, ...l, style: o });
164
+ return n && (o = { backgroundImage: `url(${n})` }), g.createElement("div", { ...t, ...l, style: o });
162
165
  }, de = {
163
166
  type: "EmptyBox",
167
+ description: "A box component with no children",
164
168
  label: "Empty Box",
165
169
  category: "core",
166
170
  group: "basic",
167
- ...m({
171
+ ...d({
168
172
  properties: {
169
- styles: u(""),
173
+ styles: p(""),
170
174
  backgroundImage: {
171
175
  type: "string",
172
176
  title: "Background Image",
@@ -176,19 +180,20 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
176
180
  }
177
181
  })
178
182
  }, me = (e) => {
179
- const { blockProps: t, styles: l, content: r, tag: o = "h1", children: n = null } = e;
180
- return n ? f.createElement(o, { ...l, ...t }, n) : f.createElement(o, {
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, {
181
185
  ...l,
182
186
  ...t,
183
- dangerouslySetInnerHTML: { __html: r }
187
+ dangerouslySetInnerHTML: { __html: n }
184
188
  });
185
189
  }, ye = {
186
190
  type: "Heading",
187
- label: "web_blocks.heading",
191
+ description: "A heading component similar to h1, h2, h3, h4, h5, h6 elements in HTML",
192
+ label: "Heading",
188
193
  category: "core",
189
- icon: z,
194
+ icon: R,
190
195
  group: "typography",
191
- ...m({
196
+ ...d({
192
197
  properties: {
193
198
  tag: {
194
199
  type: "string",
@@ -196,7 +201,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
196
201
  title: "Level",
197
202
  enum: ["h1", "h2", "h3", "h4", "h5", "h6"]
198
203
  },
199
- styles: u("text-3xl"),
204
+ styles: p("text-3xl"),
200
205
  content: {
201
206
  type: "string",
202
207
  default: "Heading goes here",
@@ -209,21 +214,22 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
209
214
  i18nProps: ["content"],
210
215
  canAcceptBlock: (e) => e === "Span" || e === "Text"
211
216
  }, ge = (e) => {
212
- const { blockProps: t, styles: l, content: r } = e;
213
- return K(e.children) ? f.createElement("p", {
217
+ const { blockProps: t, styles: l, content: n } = e;
218
+ return K(e.children) ? g.createElement("p", {
214
219
  ...l,
215
220
  ...t,
216
- dangerouslySetInnerHTML: { __html: r }
217
- }) : f.createElement("p", { ...l, ...t }, e.children);
221
+ dangerouslySetInnerHTML: { __html: n }
222
+ }) : g.createElement("p", { ...l, ...t }, e.children);
218
223
  }, fe = {
219
224
  type: "Paragraph",
225
+ description: "A paragraph component",
220
226
  label: "Paragraph",
221
227
  category: "core",
222
- icon: q,
228
+ icon: H,
223
229
  group: "typography",
224
- ...m({
230
+ ...d({
225
231
  properties: {
226
- styles: u(""),
232
+ styles: p(""),
227
233
  content: {
228
234
  type: "string",
229
235
  title: "Content",
@@ -237,25 +243,26 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
237
243
  i18nProps: ["content"],
238
244
  aiProps: ["content"],
239
245
  canAcceptBlock: (e) => e === "Span" || e === "Link" || e === "Text"
240
- }, P = (e, ...t) => ({
246
+ }, E = (e, ...t) => ({
241
247
  ...e,
242
248
  className: v(e.className, ...t)
243
249
  }), be = (e) => {
244
- const { blockProps: t, content: l, styles: r } = e, o = P(
245
- r,
250
+ const { blockProps: t, content: l, styles: n } = e, o = E(
251
+ n,
246
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",
247
253
  "max-w-full"
248
254
  );
249
255
  return /* @__PURE__ */ i("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } });
250
256
  }, he = {
251
257
  type: "RichText",
258
+ description: "A rich text block",
252
259
  label: "Rich Text",
253
260
  category: "core",
254
- icon: F,
261
+ icon: z,
255
262
  group: "typography",
256
- ...m({
263
+ ...d({
257
264
  properties: {
258
- styles: u(""),
265
+ styles: p(""),
259
266
  content: {
260
267
  type: "string",
261
268
  title: "Content",
@@ -267,20 +274,21 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
267
274
  aiProps: ["content"],
268
275
  i18nProps: ["content"]
269
276
  }, ke = (e) => {
270
- const { blockProps: t, styles: l, content: r, children: o = null, tag: n } = e;
271
- return o ? f.createElement("span", { ...l, ...t }, o) : f.createElement(n || "span", {
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", {
272
279
  ...l,
273
280
  ...t,
274
- dangerouslySetInnerHTML: { __html: r || "" }
281
+ dangerouslySetInnerHTML: { __html: n || "" }
275
282
  });
276
283
  }, we = {
277
284
  type: "Span",
285
+ description: "A span component",
278
286
  label: "Span",
279
287
  category: "core",
280
288
  group: "typography",
281
- ...m({
289
+ ...d({
282
290
  properties: {
283
- styles: u(""),
291
+ styles: p(""),
284
292
  content: {
285
293
  type: "string",
286
294
  title: "Content",
@@ -292,16 +300,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
292
300
  aiProps: ["content"],
293
301
  i18nProps: ["content"],
294
302
  canAcceptBlock: () => !0
295
- }, xe = (e) => {
296
- const { scripts: t, inBuilder: l, blockProps: r } = e;
297
- return l ? /* @__PURE__ */ i("div", { ...r, 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 } });
298
- }, Le = {
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 = {
299
307
  type: "CustomScript",
300
- label: "web_blocks.custom_script",
308
+ description: "similar to a script element in HTML",
309
+ label: "Custom Script",
301
310
  category: "core",
302
311
  icon: te,
303
312
  group: "advanced",
304
- ...m({
313
+ ...d({
305
314
  properties: {
306
315
  scripts: {
307
316
  type: "string",
@@ -312,22 +321,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
312
321
  }
313
322
  }
314
323
  })
315
- }, Ce = (e) => {
324
+ }, Le = (e) => {
316
325
  const { blockProps: t, styles: l } = e;
317
- return L("hr", { ...l, ...t });
318
- }, Ie = {
326
+ return C("hr", { ...l, ...t });
327
+ }, ve = {
319
328
  type: "Divider",
320
- label: "web_blocks.divider",
329
+ description: "A horizontal line component",
330
+ label: "Divider",
321
331
  category: "core",
322
- icon: j,
332
+ icon: q,
323
333
  group: "basic",
324
- ...m({
334
+ ...d({
325
335
  properties: {
326
- styles: u("bg-gray-900 h-0.5 py-2 my-1")
336
+ styles: p("bg-gray-900 h-0.5 py-2 my-1")
327
337
  }
328
338
  })
329
- }, ve = (e) => {
330
- const { blockProps: t, inBuilder: l, children: r, globalBlock: o } = e;
339
+ }, Ie = (e) => {
340
+ const { blockProps: t, inBuilder: l, children: n, globalBlock: o } = e;
331
341
  return l && !o ? /* @__PURE__ */ b(
332
342
  "div",
333
343
  {
@@ -341,15 +351,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
341
351
  /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
342
352
  ]
343
353
  }
344
- ) : f.createElement("span", { ...t }, r);
354
+ ) : g.createElement("span", { ...t }, n);
345
355
  }, Be = {
346
356
  type: "GlobalBlock",
357
+ description: "A global block component",
347
358
  label: "Global Block",
348
- icon: R,
359
+ icon: T,
349
360
  category: "core",
350
361
  group: "basic",
351
362
  hidden: !0,
352
- ...m({
363
+ ...d({
353
364
  properties: {
354
365
  globalBlock: {
355
366
  type: "string",
@@ -360,11 +371,11 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
360
371
  }
361
372
  })
362
373
  }, Pe = (e) => {
363
- const { blockProps: t, icon: l, styles: r, width: o, inBuilder: n, height: s } = e, a = P(r, "");
374
+ const { blockProps: t, icon: l, styles: n, width: o, inBuilder: r, height: s } = e, a = E(n, "");
364
375
  if (w(l))
365
- return /* @__PURE__ */ i(C, { inBuilder: n, className: "h-8 w-14" });
376
+ return /* @__PURE__ */ i(L, { inBuilder: r, className: "h-8 w-14" });
366
377
  const c = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
367
- return f.createElement("span", {
378
+ return g.createElement("span", {
368
379
  ...t,
369
380
  ...a,
370
381
  style: {
@@ -373,15 +384,15 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
373
384
  },
374
385
  dangerouslySetInnerHTML: { __html: c }
375
386
  });
376
- }, _e = {
387
+ }, Se = {
377
388
  type: "Icon",
378
389
  label: "web_blocks.icon",
379
390
  category: "core",
380
- icon: D,
391
+ icon: F,
381
392
  group: "media",
382
- ...m({
393
+ ...d({
383
394
  properties: {
384
- styles: u(""),
395
+ styles: p(""),
385
396
  icon: {
386
397
  type: "string",
387
398
  title: "Icon",
@@ -400,17 +411,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
400
411
  }
401
412
  }
402
413
  })
403
- }, Se = (e) => {
404
- const { blockProps: t, image: l, mobileImage: r, styles: o, alt: n, height: s, width: a, lazyLoading: c } = e;
405
- return w(l) ? /* @__PURE__ */ i(C, { className: "h-36" }) : /* @__PURE__ */ b("picture", { children: [
406
- r && /* @__PURE__ */ i("source", { srcSet: r, media: "(max-width: 480px)" }),
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: [
417
+ n && /* @__PURE__ */ i("source", { srcSet: n, media: "(max-width: 480px)" }),
407
418
  /* @__PURE__ */ i(
408
419
  "img",
409
420
  {
410
421
  ...t,
411
422
  ...o,
412
423
  src: l,
413
- alt: n,
424
+ alt: r,
414
425
  loading: c ? "lazy" : "eager",
415
426
  width: a,
416
427
  height: s
@@ -419,13 +430,14 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
419
430
  ] });
420
431
  }, Ne = {
421
432
  type: "Image",
433
+ description: "A image component",
422
434
  label: "Image",
423
435
  category: "core",
424
- icon: E,
436
+ icon: j,
425
437
  group: "media",
426
- ...m({
438
+ ...d({
427
439
  properties: {
428
- styles: u(""),
440
+ styles: p(""),
429
441
  image: {
430
442
  type: "string",
431
443
  title: "Image",
@@ -465,83 +477,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
465
477
  }),
466
478
  aiProps: ["alt"],
467
479
  i18nProps: ["alt"]
468
- }, $e = (e) => {
469
- const { blockProps: t, children: l, styles: r, inBuilder: o, content: n, href: s } = e, { hrefType: a, autoplay: c, maxWidth: y, backdropColor: g, galleryName: h } = e, p = P(r, "cb-lightbox vbox-item");
470
- if (!l && w(r == null ? void 0 : r.className) && w(n))
471
- return /* @__PURE__ */ i(C, { inBuilder: o });
472
- if (o)
473
- return l ? /* @__PURE__ */ i("span", { ...t, ...p, children: l }) : L("span", {
474
- ...t,
475
- ...p,
476
- dangerouslySetInnerHTML: { __html: n }
477
- });
478
- const x = {};
479
- return a !== "image" && (x["data-vbtype"] = a), c && (x["data-autoplay"] = "true"), y && (x["data-maxwidth"] = y + "px"), g && (x["data-overlay"] = g), h && (x["data-gall"] = h), l ? /* @__PURE__ */ i("a", { "aria-label": n, ...x, href: s || "#/", ...t, ...p, children: l }) : L("a", {
480
- ...t,
481
- ...p,
482
- ...x,
483
- href: s || "#",
484
- dangerouslySetInnerHTML: { __html: n },
485
- "aria-label": n
486
- });
487
- }, Me = {
488
- type: "LightBoxLink",
489
- label: "Lightbox Link",
490
- category: "core",
491
- icon: E,
492
- group: "basic",
493
- ...m({
494
- properties: {
495
- styles: u(""),
496
- content: {
497
- type: "string",
498
- title: "Content",
499
- default: "Link text or drop blocks inside"
500
- },
501
- hrefType: {
502
- type: "string",
503
- title: "Type",
504
- default: "image",
505
- enum: ["image", "video", "iframe", "inline", "ajax"],
506
- enumNames: ["Image", "Video", "Iframe", "Inline", "Ajax"]
507
- },
508
- href: {
509
- type: "string",
510
- title: "Href",
511
- default: ""
512
- },
513
- autoplay: {
514
- type: "boolean",
515
- title: "Autoplay (Video only)",
516
- default: !1
517
- },
518
- maxWidth: {
519
- type: "number",
520
- title: "Max Width",
521
- default: ""
522
- },
523
- backdropColor: {
524
- type: "string",
525
- title: "Backdrop Color",
526
- default: ""
527
- },
528
- galleryName: {
529
- type: "string",
530
- title: "Gallery Name",
531
- default: ""
532
- }
533
- },
534
- dependencies: {
535
- autoplay: ["hrefType", "video"]
536
- }
537
- }),
538
- i18nProps: ["content"],
539
- aiProps: ["content"],
540
- canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
541
- }, Ee = (e) => {
542
- const { blockProps: t, link: l, children: r, styles: o, inBuilder: n, content: s } = e;
480
+ }, Me = (e) => {
481
+ const { blockProps: t, link: l, children: n, styles: o, inBuilder: r, content: s } = e;
543
482
  let a = {};
544
- return !r && w(s) && (a = { minHeight: "50px", display: "flex", alignItems: "center", justifyContent: "center" }), n ? r ? /* @__PURE__ */ i("span", { ...t, style: a, ...o, children: r }) : L(
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(
545
484
  "span",
546
485
  {
547
486
  ...t,
@@ -549,7 +488,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
549
488
  style: a
550
489
  },
551
490
  s
552
- ) : r ? /* @__PURE__ */ i("a", { "aria-label": s, href: (l == null ? void 0 : l.href) || "#/", target: l == null ? void 0 : l.target, ...t, ...o, children: r }) : L(
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(
553
492
  "a",
554
493
  {
555
494
  ...t,
@@ -560,15 +499,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
560
499
  },
561
500
  s
562
501
  );
563
- }, Te = {
502
+ }, $e = {
564
503
  type: "Link",
504
+ description: "A link component",
565
505
  label: "Link",
566
506
  category: "core",
567
- icon: G,
507
+ icon: D,
568
508
  group: "basic",
569
- ...m({
509
+ ...d({
570
510
  properties: {
571
- styles: u(""),
511
+ styles: p(""),
572
512
  content: {
573
513
  type: "string",
574
514
  default: "Link goes here",
@@ -595,22 +535,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
595
535
  aiProps: ["content"],
596
536
  i18nProps: ["content"],
597
537
  canAcceptBlock: (e) => e !== "Link"
598
- }, Re = (e) => {
599
- const { blockProps: t, children: l, listType: r, styles: o, tag: n, inBuilder: s } = e, a = v(k(o, "className", ""), r);
600
- return !l && w(o == null ? void 0 : o.className) ? /* @__PURE__ */ i(C, { inBuilder: s }) : f.createElement(
601
- n || (r === "list-decimal" ? "ol" : "ul"),
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(
541
+ r || (n === "list-decimal" ? "ol" : "ul"),
602
542
  { ...t, ...o, className: a },
603
543
  l
604
544
  );
605
- }, Ae = {
545
+ }, Ee = {
606
546
  type: "List",
607
- label: "web_blocks.list",
608
- icon: U,
547
+ description: "A list component",
548
+ label: "List",
549
+ icon: G,
609
550
  category: "core",
610
551
  group: "basic",
611
- ...m({
552
+ ...d({
612
553
  properties: {
613
- styles: u(""),
554
+ styles: p(""),
614
555
  listType: {
615
556
  type: "string",
616
557
  title: "List Type",
@@ -648,22 +589,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
648
589
  content: "Item 3"
649
590
  }
650
591
  ]
651
- }, He = (e) => {
652
- const { blockProps: t, content: l, styles: r, children: o, tag: n } = e;
653
- return o ? f.createElement(n || "li", { ...r, ...t }, o) : f.createElement(n || "li", {
654
- ...r,
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", {
595
+ ...n,
655
596
  ...t,
656
597
  dangerouslySetInnerHTML: { __html: l }
657
598
  });
658
- }, ze = {
599
+ }, Re = {
659
600
  type: "ListItem",
601
+ description: "A list item component",
660
602
  label: "List Item",
661
- icon: V,
603
+ icon: U,
662
604
  category: "core",
663
605
  group: "basic",
664
- ...m({
606
+ ...d({
665
607
  properties: {
666
- styles: u(""),
608
+ styles: p(""),
667
609
  content: {
668
610
  type: "string",
669
611
  default: "List item",
@@ -678,16 +620,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
678
620
  aiProps: ["content"],
679
621
  canAcceptBlock: (e) => e !== "ListItem",
680
622
  canBeNested: (e) => e === "List"
681
- }, qe = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, Fe = {
623
+ }, He = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ i("span", { ...e.blockProps, children: e.content }) : `${e.content}`, ze = {
682
624
  type: "Text",
625
+ description: "A text component with no styling",
683
626
  label: "Text",
684
627
  hidden: !0,
685
628
  category: "core",
686
629
  group: "typography",
687
- icon: O,
688
- ...m({
630
+ icon: V,
631
+ ...d({
689
632
  properties: {
690
- styles: u("text-black"),
633
+ styles: p("text-black"),
691
634
  content: {
692
635
  title: "Content",
693
636
  type: "string",
@@ -697,39 +640,39 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
697
640
  }),
698
641
  aiProps: ["content"],
699
642
  i18nProps: ["content"]
700
- }, S = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, $ = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, je = (e) => {
701
- if (S.test(e)) {
702
- const t = e.match(S);
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);
703
646
  return t ? `https://www.youtube.com/embed/${t[4]}` : e;
704
647
  }
705
- if (N.test(e)) {
706
- const t = e.match(N);
648
+ if (S.test(e)) {
649
+ const t = e.match(S);
707
650
  return t ? `https://player.vimeo.com/video/${t[3]}` : e;
708
651
  }
709
- if ($.test(e)) {
710
- const t = e.match($);
652
+ if (_.test(e)) {
653
+ const t = e.match(_);
711
654
  return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
712
655
  }
713
656
  return null;
714
- }, De = f.memo((e) => {
715
- const { blockProps: t, inBuilder: l, styles: r, url: o, controls: n } = e, s = k(n, "autoPlay", !1), a = k(n, "controls", !1), c = s || k(n, "muted", !0), y = k(n, "loop", !1);
716
- if (w(o)) return /* @__PURE__ */ i(C, { inBuilder: l, className: "h-36" });
717
- let g = je(o), h = null;
718
- if (g) {
719
- if (!w(g)) {
720
- const p = [];
721
- p.push(`autoplay=${s ? 1 : 0}`), p.push(`controls=${n ? 1 : 0}`), p.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), p.push(`loop=${y ? 1 : 0}`), g = `${g}?${p.join("&")}`;
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("&")}`;
722
665
  }
723
- h = f.createElement("iframe", {
666
+ h = g.createElement("iframe", {
724
667
  ...t,
725
668
  className: "absolute inset-0 w-full h-full",
726
- src: g,
669
+ src: f,
727
670
  allow: l ? "" : "autoplay *; fullscreen *",
728
671
  allowFullScreen: !0,
729
672
  frameBorder: 0
730
673
  });
731
674
  } else
732
- h = f.createElement("video", {
675
+ h = g.createElement("video", {
733
676
  ...t,
734
677
  className: "absolute inset-0 w-full h-full",
735
678
  src: o,
@@ -738,19 +681,19 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
738
681
  autoPlay: l ? !1 : s,
739
682
  loop: y
740
683
  });
741
- return /* @__PURE__ */ i("div", { ...Q(r, ["className"]), children: /* @__PURE__ */ b("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
742
- l ? /* @__PURE__ */ i("div", { ...t, ...ee(r, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
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,
743
686
  h
744
687
  ] }) });
745
- }), Ge = {
688
+ }), je = {
746
689
  type: "Video",
747
690
  label: "Video",
748
691
  category: "core",
749
- icon: W,
692
+ icon: O,
750
693
  group: "media",
751
- ...m({
694
+ ...d({
752
695
  properties: {
753
- styles: u(""),
696
+ styles: p(""),
754
697
  url: {
755
698
  type: "string",
756
699
  title: "Video URL",
@@ -791,13 +734,58 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
791
734
  }
792
735
  }),
793
736
  i18nProps: ["url"]
737
+ }, 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 } })
741
+ ] });
742
+ return C(
743
+ "button",
744
+ {
745
+ ...t,
746
+ ...r,
747
+ type: "button",
748
+ "aria-label": o
749
+ },
750
+ a
751
+ );
752
+ }, Ge = {
753
+ type: "CopyButton",
754
+ description: "A copy button component",
755
+ label: "Copy Button",
756
+ category: "core",
757
+ icon: W,
758
+ group: "basic",
759
+ ...d({
760
+ properties: {
761
+ styles: p("p-2 rounded-md flex items-center"),
762
+ content: {
763
+ type: "string",
764
+ title: "Button label",
765
+ default: "Button"
766
+ },
767
+ icon: {
768
+ type: "string",
769
+ title: "Icon",
770
+ default: "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-copy'><path d='M8 17L19 8M8 17V7a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v10'/></svg>",
771
+ ui: { "ui:widget": "icon" }
772
+ },
773
+ iconSize: {
774
+ type: "number",
775
+ title: "Icon size",
776
+ default: 20
777
+ }
778
+ }
779
+ }),
780
+ i18nProps: ["content"],
781
+ aiProps: ["content"]
794
782
  }, Ue = (e) => {
795
- const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required: s, checked: a, showLabel: c = !0 } = e, y = I();
783
+ const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
796
784
  return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
797
785
  /* @__PURE__ */ i(
798
786
  "input",
799
787
  {
800
- ...n,
788
+ ...r,
801
789
  name: l,
802
790
  id: y,
803
791
  type: "checkbox",
@@ -805,13 +793,13 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
805
793
  defaultChecked: a
806
794
  }
807
795
  ),
808
- r && /* @__PURE__ */ i("label", { htmlFor: y, children: r })
796
+ n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
809
797
  ] }) : /* @__PURE__ */ i(
810
798
  "input",
811
799
  {
812
800
  id: y,
813
801
  ...t,
814
- ...n,
802
+ ...r,
815
803
  ...o,
816
804
  type: "checkbox",
817
805
  required: s,
@@ -824,10 +812,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
824
812
  category: "core",
825
813
  icon: X,
826
814
  group: "form",
827
- ...m({
815
+ ...d({
828
816
  properties: {
829
- styles: u("flex items-center gap-x-2"),
830
- inputStyles: u(""),
817
+ styles: p("flex items-center gap-x-2"),
818
+ inputStyles: p(""),
831
819
  fieldName: {
832
820
  type: "string",
833
821
  title: "Field Name",
@@ -858,19 +846,19 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
858
846
  aiProps: ["label"],
859
847
  i18nProps: ["label"]
860
848
  }, Oe = (e) => {
861
- const { children: t, blockProps: l, errorMessage: r, successMessage: o, action: n, styles: s, inBuilder: a } = e;
849
+ const { children: t, blockProps: l, errorMessage: n, successMessage: o, action: r, styles: s, inBuilder: a } = e;
862
850
  let c = t;
863
- return t || (c = /* @__PURE__ */ i(C, { inBuilder: a })), /* @__PURE__ */ b(
851
+ return t || (c = /* @__PURE__ */ i(L, { inBuilder: a })), /* @__PURE__ */ b(
864
852
  "form",
865
853
  {
866
854
  ...{
867
855
  "x-data": "{}",
868
856
  "x-on:submit.prevent": "post"
869
857
  },
870
- "data-error": r,
858
+ "data-error": n,
871
859
  "data-success": o,
872
860
  method: "post",
873
- action: n,
861
+ action: r,
874
862
  ...l,
875
863
  ...s,
876
864
  children: [
@@ -898,9 +886,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
898
886
  styles: "#styles:bg-black text-white rounded px-3 py-1,"
899
887
  }
900
888
  ],
901
- ...m({
889
+ ...d({
902
890
  properties: {
903
- styles: u(""),
891
+ styles: p(""),
904
892
  action: {
905
893
  type: "string",
906
894
  title: "Submit URL",
@@ -924,7 +912,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
924
912
  aiProps: ["errorMessage", "successMessage"],
925
913
  canAcceptBlock: () => !0
926
914
  }, Xe = (e) => {
927
- const { blockProps: t, inBuilder: l, label: r, styles: o, inputStyles: n, icon: s, iconSize: a, iconPos: c } = e, y = I();
915
+ const { blockProps: t, inBuilder: l, label: n, styles: o, inputStyles: r, icon: s, iconSize: a, iconPos: c } = e, y = x();
928
916
  return /* @__PURE__ */ b(
929
917
  "button",
930
918
  {
@@ -932,13 +920,13 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
932
920
  ...{
933
921
  "x-bind:disabled": "formLoading"
934
922
  },
935
- ...n,
923
+ ...r,
936
924
  ...o,
937
925
  ...t || {},
938
926
  type: l ? "button" : "submit",
939
- "aria-label": r,
927
+ "aria-label": n,
940
928
  children: [
941
- r,
929
+ n,
942
930
  s && /* @__PURE__ */ i(
943
931
  "div",
944
932
  {
@@ -956,12 +944,12 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
956
944
  category: "core",
957
945
  icon: M,
958
946
  group: "form",
959
- ...m({
947
+ ...d({
960
948
  properties: {
961
- styles: u(
949
+ styles: p(
962
950
  "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
963
951
  ),
964
- inputStyles: u(""),
952
+ inputStyles: p(""),
965
953
  label: {
966
954
  type: "string",
967
955
  title: "Label",
@@ -994,17 +982,17 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
994
982
  const {
995
983
  blockProps: t,
996
984
  fieldName: l,
997
- label: r,
985
+ label: n,
998
986
  placeholder: o,
999
- styles: n,
987
+ styles: r,
1000
988
  inputStyles: s,
1001
989
  showLabel: a,
1002
990
  required: c,
1003
991
  inputType: y,
1004
- autocomplete: g
1005
- } = e, h = I();
1006
- return a ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
1007
- a && /* @__PURE__ */ i("label", { htmlFor: h, children: r }),
992
+ autocomplete: f
993
+ } = e, h = x();
994
+ return a ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
995
+ a && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
1008
996
  /* @__PURE__ */ i(
1009
997
  "input",
1010
998
  {
@@ -1014,7 +1002,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1014
1002
  type: y,
1015
1003
  placeholder: o,
1016
1004
  required: c,
1017
- autoComplete: g ? "on" : "off"
1005
+ autoComplete: f ? "on" : "off"
1018
1006
  }
1019
1007
  )
1020
1008
  ] }) : /* @__PURE__ */ i(
@@ -1024,23 +1012,23 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1024
1012
  name: l,
1025
1013
  ...t,
1026
1014
  ...s,
1027
- ...n,
1015
+ ...r,
1028
1016
  type: y,
1029
1017
  placeholder: o,
1030
1018
  required: c,
1031
- autoComplete: g ? "on" : "off"
1019
+ autoComplete: f ? "on" : "off"
1032
1020
  }
1033
1021
  );
1034
1022
  }, Je = {
1035
1023
  type: "Input",
1036
1024
  label: "web_blocks.input",
1037
1025
  category: "core",
1038
- icon: T,
1026
+ icon: $,
1039
1027
  group: "form",
1040
- ...m({
1028
+ ...d({
1041
1029
  properties: {
1042
- styles: u(""),
1043
- inputStyles: u("w-full p-1"),
1030
+ styles: p(""),
1031
+ inputStyles: p("w-full p-1"),
1044
1032
  fieldName: {
1045
1033
  type: "string",
1046
1034
  title: "Field Name",
@@ -1084,9 +1072,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1084
1072
  aiProps: ["label", "placeholder"],
1085
1073
  i18nProps: ["label", "placeholder"]
1086
1074
  }, Ke = (e) => {
1087
- const { blockProps: t, content: l, styles: r, children: o } = e, n = { ...r, ...t };
1088
- return o ? f.createElement("label", n, o) : f.createElement("label", {
1089
- ...n,
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", {
1077
+ ...r,
1090
1078
  dangerouslySetInnerHTML: { __html: l }
1091
1079
  });
1092
1080
  }, Qe = {
@@ -1095,9 +1083,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1095
1083
  category: "core",
1096
1084
  icon: Y,
1097
1085
  group: "form",
1098
- ...m({
1086
+ ...d({
1099
1087
  properties: {
1100
- styles: u(),
1088
+ styles: p(),
1101
1089
  content: {
1102
1090
  type: "string",
1103
1091
  title: "Content",
@@ -1108,16 +1096,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1108
1096
  aiProps: ["content"],
1109
1097
  i18nProps: ["content"]
1110
1098
  }, et = (e) => {
1111
- const { blockProps: t, fieldName: l, label: r, styles: o, inputStyles: n, required: s, checked: a, showLabel: c = !0 } = e, y = I();
1099
+ const { blockProps: t, fieldName: l, label: n, styles: o, inputStyles: r, required: s, checked: a, showLabel: c = !0 } = e, y = x();
1112
1100
  return c ? /* @__PURE__ */ b("div", { ...o, ...t, children: [
1113
- /* @__PURE__ */ i("input", { ...n, name: l, id: y, type: "radio", required: s, defaultChecked: a }),
1114
- r && /* @__PURE__ */ i("label", { htmlFor: y, children: r })
1101
+ /* @__PURE__ */ i("input", { ...r, name: l, id: y, type: "radio", required: s, defaultChecked: a }),
1102
+ n && /* @__PURE__ */ i("label", { htmlFor: y, children: n })
1115
1103
  ] }) : /* @__PURE__ */ i(
1116
1104
  "input",
1117
1105
  {
1118
1106
  id: y,
1119
1107
  ...t,
1120
- ...n,
1108
+ ...r,
1121
1109
  ...o,
1122
1110
  type: "radio",
1123
1111
  required: s,
@@ -1131,10 +1119,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1131
1119
  category: "core",
1132
1120
  icon: Z,
1133
1121
  group: "form",
1134
- ...m({
1122
+ ...d({
1135
1123
  properties: {
1136
- styles: u("flex items-center gap-x-2"),
1137
- inputStyles: u(""),
1124
+ styles: p("flex items-center gap-x-2"),
1125
+ inputStyles: p(""),
1138
1126
  fieldName: {
1139
1127
  type: "string",
1140
1128
  title: "Field Name",
@@ -1165,16 +1153,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1165
1153
  aiProps: ["label"],
1166
1154
  i18nProps: ["label"]
1167
1155
  }, lt = (e) => {
1168
- const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles: s, required: a, showLabel: c, _multiple: y, options: g } = e, h = I();
1169
- return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
1170
- c && /* @__PURE__ */ i("label", { htmlFor: h, children: r }),
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();
1157
+ return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
1158
+ c && /* @__PURE__ */ i("label", { htmlFor: h, children: n }),
1171
1159
  /* @__PURE__ */ b("select", { ...s, id: h, required: a, multiple: y, name: l, children: [
1172
1160
  /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
1173
- _(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
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))
1174
1162
  ] })
1175
- ] }) : /* @__PURE__ */ b("select", { id: h, ...n, ...t, required: a, multiple: y, name: l, children: [
1163
+ ] }) : /* @__PURE__ */ b("select", { id: h, ...r, ...t, required: a, multiple: y, name: l, children: [
1176
1164
  /* @__PURE__ */ i("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
1177
- _(g, (p) => /* @__PURE__ */ i("option", { value: p == null ? void 0 : p.value, children: p == null ? void 0 : p.label }, p == null ? void 0 : p.value))
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))
1178
1166
  ] });
1179
1167
  }, ot = {
1180
1168
  type: "Select",
@@ -1182,10 +1170,10 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1182
1170
  category: "core",
1183
1171
  icon: J,
1184
1172
  group: "form",
1185
- ...m({
1173
+ ...d({
1186
1174
  properties: {
1187
- styles: u(""),
1188
- inputStyles: u("w-full p-1"),
1175
+ styles: p(""),
1176
+ inputStyles: p("w-full p-1"),
1189
1177
  fieldName: {
1190
1178
  type: "string",
1191
1179
  title: "Field Name",
@@ -1240,16 +1228,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1240
1228
  }),
1241
1229
  aiProps: ["label", "placeholder"],
1242
1230
  i18nProps: ["label", "placeholder"]
1243
- }, rt = (e) => {
1244
- const { blockProps: t, fieldName: l, label: r, placeholder: o, styles: n, inputStyles: s, rows: a, showLabel: c, required: y } = e, g = I();
1245
- return c ? /* @__PURE__ */ b("div", { ...n, ...t, children: [
1246
- c && /* @__PURE__ */ i("label", { htmlFor: g, children: r }),
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();
1233
+ return c ? /* @__PURE__ */ b("div", { ...r, ...t, children: [
1234
+ c && /* @__PURE__ */ i("label", { htmlFor: f, children: n }),
1247
1235
  /* @__PURE__ */ i(
1248
1236
  "textarea",
1249
1237
  {
1250
1238
  name: l,
1251
1239
  ...s,
1252
- id: g,
1240
+ id: f,
1253
1241
  placeholder: o,
1254
1242
  rows: a,
1255
1243
  required: y
@@ -1258,31 +1246,31 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1258
1246
  ] }) : /* @__PURE__ */ i(
1259
1247
  "textarea",
1260
1248
  {
1261
- id: g,
1249
+ id: f,
1262
1250
  name: l,
1263
1251
  ...t,
1264
1252
  ...s,
1265
- ...n,
1253
+ ...r,
1266
1254
  placeholder: o,
1267
1255
  rows: a,
1268
1256
  required: y
1269
1257
  }
1270
1258
  );
1271
- }, nt = {
1259
+ }, rt = {
1272
1260
  type: "TextArea",
1273
1261
  label: "web_blocks.textarea",
1274
1262
  category: "core",
1275
- icon: T,
1263
+ icon: $,
1276
1264
  group: "form",
1277
- ...m({
1265
+ ...d({
1278
1266
  properties: {
1279
1267
  fieldName: {
1280
1268
  type: "string",
1281
1269
  title: "Field Name",
1282
1270
  default: "fieldName"
1283
1271
  },
1284
- styles: u(""),
1285
- inputStyles: u("w-full p-1"),
1272
+ styles: p(""),
1273
+ inputStyles: p("w-full p-1"),
1286
1274
  showLabel: {
1287
1275
  type: "boolean",
1288
1276
  title: "Show Label",
@@ -1315,16 +1303,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1315
1303
  i18nProps: ["label", "placeholder"]
1316
1304
  }, it = (e) => {
1317
1305
  const { blockProps: t, styles: l } = e;
1318
- return L("br", { ...t, ...l });
1306
+ return C("br", { ...t, ...l });
1319
1307
  }, st = {
1320
1308
  type: "LineBreak",
1321
1309
  label: "Line Break",
1322
1310
  category: "core",
1323
1311
  group: "basic",
1324
1312
  hidden: !0,
1325
- ...m({
1313
+ ...d({
1326
1314
  properties: {
1327
- styles: u("")
1315
+ styles: p("")
1328
1316
  }
1329
1317
  }),
1330
1318
  canAcceptBlock: () => !0,
@@ -1332,7 +1320,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1332
1320
  canMove: () => !1,
1333
1321
  canDuplicate: () => !1
1334
1322
  }, at = (e) => {
1335
- const { blockProps: t, inBuilder: l, children: r, partialBlockId: o } = e;
1323
+ const { blockProps: t, inBuilder: l, children: n, partialBlockId: o } = e;
1336
1324
  return l && !o ? /* @__PURE__ */ b(
1337
1325
  "div",
1338
1326
  {
@@ -1346,15 +1334,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1346
1334
  /* @__PURE__ */ i("p", { children: "Choose a block from the sidebar to add it to this page." })
1347
1335
  ]
1348
1336
  }
1349
- ) : f.createElement("span", { ...t }, r);
1337
+ ) : g.createElement("span", { ...t }, n);
1350
1338
  }, ct = {
1351
1339
  type: "PartialBlock",
1340
+ description: "A partial block component",
1352
1341
  label: "Partial Block",
1353
- icon: R,
1342
+ icon: T,
1354
1343
  category: "core",
1355
1344
  group: "basic",
1356
1345
  hidden: !0,
1357
- ...m({
1346
+ ...d({
1358
1347
  properties: {
1359
1348
  partialBlockId: {
1360
1349
  type: "string",
@@ -1364,7 +1353,7 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1364
1353
  }
1365
1354
  }
1366
1355
  })
1367
- }, B = {
1356
+ }, I = {
1368
1357
  SMALL: {
1369
1358
  1: "col-span-1",
1370
1359
  2: "col-span-2",
@@ -1408,15 +1397,16 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1408
1397
  12: "lg:col-span-12"
1409
1398
  }
1410
1399
  }, pt = (e) => {
1411
- const { blockProps: t, children: l, styles: r, colSpan: o, tabletColSpan: n, desktopColSpan: s } = e, c = { className: [
1412
- k(r, "className", ""),
1413
- k(B, ["SMALL", isNaN(o) || !o ? 6 : o], ""),
1414
- n ? k(B, ["MEDIUM", n || o], "") : "",
1415
- s ? k(B, ["LARGE", n || o], "") : ""
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], "") : ""
1416
1405
  ].join(" ") };
1417
- return /* @__PURE__ */ i("div", { ...t, ...r, ...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" }) });
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" }) });
1418
1407
  }, ut = {
1419
1408
  type: "Column",
1409
+ description: "A column component",
1420
1410
  label: "Column",
1421
1411
  group: "basic",
1422
1412
  category: "core",
@@ -1425,9 +1415,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1425
1415
  canDelete: () => !0,
1426
1416
  canAcceptBlock: () => !0,
1427
1417
  canBeNested: (e) => e === "Row",
1428
- ...m({
1418
+ ...d({
1429
1419
  properties: {
1430
- styles: u(""),
1420
+ styles: p(""),
1431
1421
  colSpan: {
1432
1422
  type: "number",
1433
1423
  title: "Column Span",
@@ -1451,13 +1441,14 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1451
1441
  }
1452
1442
  })
1453
1443
  }, dt = (e) => {
1454
- const { blockProps: t, children: l, styles: r, gutter: o } = e, s = { className: [k(r, "className", ""), " grid grid-cols-12"].join() };
1455
- return typeof (r == null ? void 0 : r.style) == "object" ? r.style.gap = `${o}px` : s.style = { gap: `${o}px` }, /* @__PURE__ */ i("div", { ...t, ...r, ...s, children: l });
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 });
1456
1446
  }, mt = {
1457
1447
  type: "Row",
1448
+ description: "A row component",
1458
1449
  label: "Row",
1459
1450
  group: "basic",
1460
- icon: re,
1451
+ icon: ne,
1461
1452
  blocks: () => [
1462
1453
  { _type: "Row", _id: "row", styles: "#styles:,p-1" },
1463
1454
  { _type: "Column", id: "column", _parent: "row", styles: "#styles:," },
@@ -1466,9 +1457,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1466
1457
  category: "core",
1467
1458
  wrapper: !0,
1468
1459
  canAcceptBlock: (e) => e === "Column",
1469
- ...m({
1460
+ ...d({
1470
1461
  properties: {
1471
- styles: u(""),
1462
+ styles: p(""),
1472
1463
  colCount: {
1473
1464
  type: "number",
1474
1465
  default: 2,
@@ -1483,9 +1474,9 @@ const C = ({ className: e = "", inBuilder: t }) => t ? /* @__PURE__ */ i("div",
1483
1474
  }
1484
1475
  }
1485
1476
  })
1486
- }, xt = () => {
1487
- d(ne, ie), d(ue, de), d(se, ae), d(me, ye), d(ge, fe), d(ke, we), d(be, he), d(Ee, Te), d($e, Me), d(Re, Ae), d(He, ze), d(Pe, _e), d(Se, Ne), d(De, Ge), d(ce, pe), d(xe, Le), d(qe, Fe), d(Oe, We), d(Xe, Ye), d(Ze, Je), d(Ue, Ve), d(et, tt), d(lt, ot), d(rt, nt), d(Ke, Qe), d(it, st), d(Ce, Ie), d(ve, Be), d(at, ct), d(dt, mt), d(pt, ut);
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);
1488
1479
  };
1489
1480
  export {
1490
- xt as loadWebBlocks
1481
+ Ct as loadWebBlocks
1491
1482
  };