@chaibuilder/sdk 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/{AddBlocks-gbfzju1d.js → AddBlocks-tMxKPoen.js} +50 -50
  2. package/dist/{AddBlocks-wuKI1ieB.cjs → AddBlocks-x2LkOHSj.cjs} +1 -1
  3. package/dist/BrandingOptions-EzT9UYd6.cjs +1 -0
  4. package/dist/{BrandingOptions-mZXO7thQ.js → BrandingOptions-QJJ1y5ez.js} +55 -50
  5. package/dist/{CanvasArea-7GpvsKP6.js → CanvasArea-EfZgx-gN.js} +406 -404
  6. package/dist/CanvasArea-rIDwPHl5.cjs +60 -0
  7. package/dist/{CurrentPage-tHBommaV.cjs → CurrentPage-QNFPD078.cjs} +1 -1
  8. package/dist/{CurrentPage-C52wu_r7.js → CurrentPage-ulHTz4MD.js} +7 -7
  9. package/dist/{Layers-NDtp2-im.js → Layers-rehZkz78.js} +171 -148
  10. package/dist/Layers-v-7k3W2I.cjs +1 -0
  11. package/dist/{MarkAsGlobalBlock-SPWd6Flk.js → MarkAsGlobalBlock-BjP-Rqlf.js} +6 -5
  12. package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +1 -0
  13. package/dist/{PagesPanel-qV7yGT-K.js → PagesPanel-acGVGJf-.js} +5 -5
  14. package/dist/{PagesPanel-qZ_-tybb.cjs → PagesPanel-x5ms_LOD.cjs} +1 -1
  15. package/dist/{ProjectPanel-vzyFbBNU.cjs → ProjectPanel-5BHQ5ANP.cjs} +1 -1
  16. package/dist/{ProjectPanel-RJqNz-uq.js → ProjectPanel-aLFJq49M.js} +5 -5
  17. package/dist/Settings-iOjfw5NQ.cjs +1 -0
  18. package/dist/{Settings-t0I7LKxe.js → Settings-v-txwlII.js} +172 -171
  19. package/dist/{SidePanels-rXx-fGjB.js → SidePanels-Vdc-J5wK.js} +96 -93
  20. package/dist/SidePanels-t0g9ZQFT.cjs +1 -0
  21. package/dist/Topbar-V8xCetWF.cjs +1 -0
  22. package/dist/{Topbar-ks1ckGLz.js → Topbar-j4t4AgCq.js} +4 -3
  23. package/dist/{UnsplashImages-8vJPuqrF.js → UnsplashImages-41Y3q5_Q.js} +7 -6
  24. package/dist/UnsplashImages-DbHky6cj.cjs +1 -0
  25. package/dist/UploadImages-DnQ95_NW.cjs +1 -0
  26. package/dist/{UploadImages-6N6UrjLo.js → UploadImages-xBg-kbKv.js} +13 -12
  27. package/dist/{add-page-modal-a8r8poMY.cjs → add-page-modal-0YAI9dXr.cjs} +1 -1
  28. package/dist/{add-page-modal-2VlONTs5.js → add-page-modal-6DlGzdA4.js} +5 -5
  29. package/dist/{confirm-alert-f3DYO5Hj.cjs → confirm-alert-U7-NcG7G.cjs} +1 -1
  30. package/dist/{confirm-alert-biqvaLT-.js → confirm-alert-i4pM3mOt.js} +4 -3
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.js +19 -19
  33. package/dist/{delete-page-modal-_8O4RCkG.js → delete-page-modal-T_rlQfNd.js} +4 -4
  34. package/dist/{delete-page-modal-NmwHGjZP.cjs → delete-page-modal-qXpi_2xR.cjs} +1 -1
  35. package/dist/email-blocks.cjs +1 -1
  36. package/dist/email-blocks.js +263 -24
  37. package/dist/{form-Moz_psOw.js → form-OVmsLOrc.js} +1 -1
  38. package/dist/{form-lJhy9DEC.cjs → form-VbouZlAW.cjs} +1 -1
  39. package/dist/html-to-json-2PeOCVey.cjs +1 -0
  40. package/dist/{html-to-json-yjzEN9OX.js → html-to-json-57841sEK.js} +25 -26
  41. package/dist/{index-482XFRhB.js → index-EGUphg4R.js} +5402 -5366
  42. package/dist/index-H6vIwGfD.cjs +1 -0
  43. package/dist/index-e0c8PmRQ.js +205 -0
  44. package/dist/index-gi1LIOCw.cjs +1 -0
  45. package/dist/{index-3OU9zl6c.cjs → index-jw8RxsTv.cjs} +33 -33
  46. package/dist/{index-_OgCuSUz.js → index-niHREMmR.js} +1051 -1043
  47. package/dist/lib.cjs +1 -1
  48. package/dist/lib.js +20 -21
  49. package/dist/mockServiceWorker.js +1 -1
  50. package/dist/{page-viewer-ajtG_WZC.js → page-viewer-EoYYnA56.js} +5 -5
  51. package/dist/{page-viewer-k2VlWE3T.cjs → page-viewer-Ou8vDXGV.cjs} +1 -1
  52. package/dist/{project-general-setting-tAgCjUtR.cjs → project-general-setting-92q4oEYv.cjs} +1 -1
  53. package/dist/{project-general-setting-TIHLI4Qg.js → project-general-setting-DC_nADG-.js} +5 -5
  54. package/dist/{project-seo-setting-9JGBPzcA.cjs → project-seo-setting-Snn2nZgS.cjs} +1 -1
  55. package/dist/{project-seo-setting-dXclexQW.js → project-seo-setting-wxAGEkd_.js} +8 -7
  56. package/dist/{single-page-detail-6btKDNjs.cjs → single-page-detail-QmmhR_h2.cjs} +1 -1
  57. package/dist/{single-page-detail-lST7hWvC.js → single-page-detail-xtNZ9YxX.js} +6 -6
  58. package/dist/studio.cjs +1 -1
  59. package/dist/studio.js +4 -4
  60. package/dist/style.css +1 -1
  61. package/dist/ui.cjs +1 -1
  62. package/dist/ui.js +134 -133
  63. package/dist/{useAddBlockByDrop-uPXvrg4G.js → useAddBlockByDrop-_nwI4W3q.js} +1 -1
  64. package/dist/{useAddBlockByDrop-_nd8yZBa.cjs → useAddBlockByDrop-inkD7Lck.cjs} +1 -1
  65. package/dist/web-blocks.cjs +2 -2
  66. package/dist/web-blocks.js +138 -139
  67. package/package.json +5 -5
  68. package/dist/BrandingOptions-arKT1zCy.cjs +0 -1
  69. package/dist/CanvasArea-jvwkPvtQ.cjs +0 -59
  70. package/dist/Layers-4G-0aNk9.cjs +0 -1
  71. package/dist/MarkAsGlobalBlock-S2BhHTsK.cjs +0 -1
  72. package/dist/Settings-SV08lVcH.cjs +0 -1
  73. package/dist/SidePanels-TOJotvzn.cjs +0 -1
  74. package/dist/Topbar-u5XKdWgQ.cjs +0 -1
  75. package/dist/UnsplashImages-V8oKEHfi.cjs +0 -1
  76. package/dist/UploadImages-eHYxwWAp.cjs +0 -1
  77. package/dist/html-to-json-5UoswV2Q.cjs +0 -1
  78. package/dist/index-IIJ_o44s.cjs +0 -1
@@ -1,20 +1,19 @@
1
+ import { omit as A, isEmpty as k, isNull as D, get as v, map as S, noop as q } from "lodash-es";
1
2
  import * as d from "react";
2
- import { S as c, o as E, f as v, g as I, m as w, u as f, q as H, T as P, c as R, b as D, r as h, h as q } from "./controls-XPXGHKht.js";
3
+ import { S as c, o as j, f as I, g as L, m as w, u as f, q as M, T as E, c as H, b as $, r as h, h as O } from "./controls-XPXGHKht.js";
3
4
  import { registerChaiBlock as u } from "@chaibuilder/runtime";
4
5
  import { j as a } from "./jsx-runtime-WbnYoNE9.js";
5
- import { omit as $, isEmpty as k, isNull as O, get as S, map as j, noop as V } from "lodash-es";
6
6
  import { c as B, g as x } from "./Functions-7jnEwJyw.js";
7
- import { HeadingIcon as U, TextIcon as W, CursorTextIcon as G, ButtonIcon as F, Link1Icon as Y, RowsIcon as X, ColumnsIcon as Z, SketchLogoIcon as J, ImageIcon as K, VideoIcon as Q, CodeIcon as ee, DividerHorizontalIcon as te, SpaceBetweenVerticallyIcon as z, TableIcon as le, BorderTopIcon as oe, BorderAllIcon as re, ViewHorizontalIcon as se, DragHandleHorizontalIcon as ae, GroupIcon as ne, LetterCaseToggleIcon as ie, InputIcon as A, DropdownMenuIcon as ce, CheckboxIcon as de, RadiobuttonIcon as ue } from "@radix-ui/react-icons";
8
- import { get as T } from "lodash";
7
+ import { HeadingIcon as V, TextIcon as U, CursorTextIcon as W, ButtonIcon as R, Link1Icon as G, RowsIcon as Y, ColumnsIcon as X, SketchLogoIcon as Z, ImageIcon as J, VideoIcon as K, CodeIcon as Q, DividerHorizontalIcon as ee, SpaceBetweenVerticallyIcon as F, TableIcon as te, BorderTopIcon as le, BorderAllIcon as oe, ViewHorizontalIcon as re, DragHandleHorizontalIcon as se, GroupIcon as ae, LetterCaseToggleIcon as ne, InputIcon as z, DropdownMenuIcon as ie, CheckboxIcon as ce, RadiobuttonIcon as de } from "@radix-ui/react-icons";
9
8
  import "./_commonjsHelpers-UyOWmZb0.js";
10
9
  import "clsx";
11
10
  import "tailwind-merge";
12
- const pe = (l) => {
11
+ const ue = (l) => {
13
12
  const { blockProps: e, backgroundImage: t, children: o, styles: s } = l;
14
13
  let r = {};
15
14
  return t && (r = { backgroundImage: `url(${t})` }), d.createElement("div", { ...e, ...s, style: r }, o);
16
15
  };
17
- u(pe, {
16
+ u(ue, {
18
17
  type: "Body",
19
18
  label: "Body",
20
19
  category: "core",
@@ -22,7 +21,7 @@ u(pe, {
22
21
  hidden: !0,
23
22
  props: {
24
23
  styles: c({ default: "font-body antialiased" }),
25
- backgroundImage: E({ title: "Background Image" })
24
+ backgroundImage: j({ title: "Background Image" })
26
25
  }
27
26
  });
28
27
  const g = ({ blockProps: l, className: e = "", styles: t = {} }) => /* @__PURE__ */ a.jsx(
@@ -30,10 +29,10 @@ const g = ({ blockProps: l, className: e = "", styles: t = {} }) => /* @__PURE__
30
29
  {
31
30
  ...l,
32
31
  className: B("flex h-20 flex-col items-center justify-center", e),
33
- ...$(t, ["className"]),
32
+ ...A(t, ["className"]),
34
33
  children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300", children: /* @__PURE__ */ a.jsx("span", { className: "opacit flex items-center gap-x-1.5 text-xs font-semibold text-gray-400" }) })
35
34
  }
36
- ), me = d.memo(
35
+ ), pe = d.memo(
37
36
  (l) => {
38
37
  const { blockProps: e, backgroundImage: t, children: o, tag: s = "div", styles: r } = l;
39
38
  if (!o && k(r == null ? void 0 : r.className))
@@ -42,14 +41,14 @@ const g = ({ blockProps: l, className: e = "", styles: t = {} }) => /* @__PURE__
42
41
  return t && (n = { backgroundImage: `url(${t})` }), d.createElement(s, { ...e, ...r, style: n }, o);
43
42
  }
44
43
  );
45
- u(me, {
44
+ u(pe, {
46
45
  type: "Box",
47
46
  label: "Box",
48
47
  category: "core",
49
48
  group: "basic",
50
49
  props: {
51
50
  styles: c({ default: "" }),
52
- tag: v({
51
+ tag: I({
53
52
  title: "Tag",
54
53
  default: "div",
55
54
  options: [
@@ -72,10 +71,10 @@ u(me, {
72
71
  { value: "mark", title: "mark" }
73
72
  ]
74
73
  }),
75
- backgroundImage: E({ title: "Background Image" })
74
+ backgroundImage: j({ title: "Background Image" })
76
75
  }
77
76
  });
78
- const fe = (l) => {
77
+ const me = (l) => {
79
78
  const { blockProps: e, styles: t, content: o, level: s = "h1", children: r = null } = l;
80
79
  return r ? d.createElement(s, { ...t, ...e }, r) : d.createElement(s, {
81
80
  ...t,
@@ -83,14 +82,14 @@ const fe = (l) => {
83
82
  dangerouslySetInnerHTML: { __html: o }
84
83
  });
85
84
  };
86
- u(fe, {
85
+ u(me, {
87
86
  type: "Heading",
88
87
  label: "Heading",
89
88
  category: "core",
90
- icon: U,
89
+ icon: V,
91
90
  group: "basic",
92
91
  props: {
93
- level: v({
92
+ level: I({
94
93
  title: "Level",
95
94
  default: "h1",
96
95
  binding: !1,
@@ -104,32 +103,32 @@ u(fe, {
104
103
  ]
105
104
  }),
106
105
  styles: c({ default: "text-3xl" }),
107
- content: I({ title: "Content", default: "Heading goes here" })
106
+ content: L({ title: "Content", default: "Heading goes here" })
108
107
  }
109
108
  });
110
- const be = (l) => {
109
+ const fe = (l) => {
111
110
  const { blockProps: e, styles: t, content: o } = l;
112
- return O(l.children) ? d.createElement("div", {
111
+ return D(l.children) ? d.createElement("div", {
113
112
  ...t,
114
113
  ...e,
115
114
  dangerouslySetInnerHTML: { __html: o }
116
115
  }) : d.createElement("p", { ...t, ...e }, l.children);
117
116
  };
118
- u(be, {
117
+ u(fe, {
119
118
  type: "Paragraph",
120
119
  label: "Paragraph",
121
120
  category: "core",
122
- icon: W,
121
+ icon: U,
123
122
  group: "basic",
124
123
  props: {
125
124
  styles: c({ default: "" }),
126
- content: I({
125
+ content: L({
127
126
  title: "Content",
128
127
  default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
129
128
  })
130
129
  }
131
130
  });
132
- const ye = (l) => {
131
+ const be = (l) => {
133
132
  const { blockProps: e, styles: t, content: o, children: s = null, tag: r } = l;
134
133
  return s ? d.createElement("span", { ...t, ...e }, s) : d.createElement(r || "span", {
135
134
  ...t,
@@ -137,25 +136,25 @@ const ye = (l) => {
137
136
  dangerouslySetInnerHTML: { __html: o }
138
137
  });
139
138
  };
140
- u(ye, {
139
+ u(be, {
141
140
  type: "Span",
142
141
  label: "Span",
143
142
  category: "core",
144
143
  group: "basic",
145
144
  props: {
146
145
  styles: c({ default: "" }),
147
- content: I({ title: "Content", default: "Enter your content" })
146
+ content: L({ title: "Content", default: "Enter your content" })
148
147
  }
149
148
  });
150
- const he = (l) => {
149
+ const ye = (l) => {
151
150
  const { blockProps: e, content: t, styles: o } = l;
152
151
  return /* @__PURE__ */ a.jsx("div", { className: "prose max-w-full", children: /* @__PURE__ */ a.jsx("div", { ...e, ...o, dangerouslySetInnerHTML: { __html: t } }) });
153
152
  };
154
- u(he, {
153
+ u(ye, {
155
154
  type: "RichText",
156
155
  label: "Rich Text",
157
156
  category: "core",
158
- icon: G,
157
+ icon: W,
159
158
  group: "basic",
160
159
  props: {
161
160
  styles: c({ default: "" }),
@@ -173,7 +172,7 @@ Utilize nested lists for organization.`
173
172
  })
174
173
  }
175
174
  });
176
- const ge = (l) => {
175
+ const he = (l) => {
177
176
  const { blockProps: e, iconSize: t, icon: o, content: s, iconPos: r, styles: n, children: i } = l, p = o, m = i || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
178
177
  s,
179
178
  p && /* @__PURE__ */ a.jsx(
@@ -187,19 +186,19 @@ const ge = (l) => {
187
186
  ] });
188
187
  return d.createElement("button", { ...e, ...n, type: "button" }, m);
189
188
  };
190
- u(ge, {
189
+ u(he, {
191
190
  type: "Button",
192
191
  label: "Button",
193
192
  category: "core",
194
- icon: F,
193
+ icon: R,
195
194
  group: "basic",
196
195
  props: {
197
196
  content: f({ title: "Label", default: "Button", multiLingual: !0 }),
198
197
  styles: c({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
199
- link: H({ title: "Link", default: { type: "page", href: "", target: "_blank" } }),
200
- icon: P({ title: "Icon", default: "" }),
201
- iconSize: R({ title: "Icon Size", default: 24 }),
202
- iconPos: v({
198
+ link: M({ title: "Link", default: { type: "page", href: "", target: "_blank" } }),
199
+ icon: E({ title: "Icon", default: "" }),
200
+ iconSize: H({ title: "Icon Size", default: 24 }),
201
+ iconPos: I({
203
202
  title: "Icon Position",
204
203
  default: "order-last",
205
204
  options: [
@@ -209,7 +208,7 @@ u(ge, {
209
208
  })
210
209
  }
211
210
  });
212
- const xe = (l) => {
211
+ const ge = (l) => {
213
212
  const { blockProps: e, link: t, children: o, styles: s, inBuilder: r, content: n } = l;
214
213
  return !o && k(s == null ? void 0 : s.className) && k(n) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : r ? o ? /* @__PURE__ */ a.jsx("span", { "data-simulate": "a", ...e, ...s, children: o }) : d.createElement("span", {
215
214
  ...e,
@@ -226,38 +225,38 @@ const xe = (l) => {
226
225
  dangerouslySetInnerHTML: { __html: n }
227
226
  });
228
227
  };
229
- u(xe, {
228
+ u(ge, {
230
229
  type: "Link",
231
230
  label: "Link",
232
231
  category: "core",
233
- icon: Y,
232
+ icon: G,
234
233
  group: "basic",
235
234
  props: {
236
235
  styles: c({ default: "" }),
237
236
  content: f({ title: "Content", default: "" }),
238
- link: H({
237
+ link: M({
239
238
  title: "Link",
240
239
  default: { type: "page", target: "_self", href: "" }
241
240
  })
242
241
  }
243
242
  });
244
- const ke = (l) => {
245
- const { blockProps: e, children: t, listType: o, styles: s, tag: r } = l, n = B(S(s, "className", ""), o);
243
+ const xe = (l) => {
244
+ const { blockProps: e, children: t, listType: o, styles: s, tag: r } = l, n = B(v(s, "className", ""), o);
246
245
  return !t && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "LIST ITEM" }) : d.createElement(
247
246
  r || (o === "list-decimal" ? "ol" : "ul"),
248
247
  { ...e, ...s, className: n },
249
248
  t
250
249
  );
251
250
  };
252
- u(ke, {
251
+ u(xe, {
253
252
  type: "List",
254
253
  label: "List",
255
- icon: X,
254
+ icon: Y,
256
255
  category: "core",
257
256
  group: "basic",
258
257
  props: {
259
258
  styles: c({ default: "" }),
260
- listType: v({
259
+ listType: I({
261
260
  title: "List type",
262
261
  default: "list-disc",
263
262
  options: [
@@ -292,7 +291,7 @@ u(ke, {
292
291
  }
293
292
  ]
294
293
  });
295
- const ve = (l) => {
294
+ const ke = (l) => {
296
295
  const { blockProps: e, content: t, styles: o, children: s, tag: r } = l;
297
296
  return s ? d.createElement(r || "li", { ...o, ...e }, s) : d.createElement(r || "li", {
298
297
  ...o,
@@ -300,18 +299,18 @@ const ve = (l) => {
300
299
  dangerouslySetInnerHTML: { __html: t }
301
300
  });
302
301
  };
303
- u(ve, {
302
+ u(ke, {
304
303
  type: "ListItem",
305
304
  label: "List Item",
306
- icon: Z,
305
+ icon: X,
307
306
  category: "core",
308
307
  group: "basic",
309
308
  props: {
310
309
  styles: c({ default: "" }),
311
- content: I({ title: "Content", default: "List item" })
310
+ content: L({ title: "Content", default: "List item" })
312
311
  }
313
312
  });
314
- const Ie = (l) => {
313
+ const ve = (l) => {
315
314
  const { blockProps: e, icon: t, styles: o } = l, s = {
316
315
  ...o,
317
316
  className: B(o.className, "inline-block c-inline-block")
@@ -322,21 +321,21 @@ const Ie = (l) => {
322
321
  dangerouslySetInnerHTML: { __html: t }
323
322
  });
324
323
  };
325
- u(Ie, {
324
+ u(ve, {
326
325
  type: "Icon",
327
326
  label: "Icon",
328
327
  category: "core",
329
- icon: J,
328
+ icon: Z,
330
329
  group: "basic",
331
330
  props: {
332
331
  styles: c({ default: "text-black" }),
333
- icon: P({
332
+ icon: E({
334
333
  title: "Icon",
335
334
  default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
336
335
  })
337
336
  }
338
337
  });
339
- const Le = (l) => {
338
+ const Ie = (l) => {
340
339
  const { blockProps: e, image: t, styles: o, alt: s, height: r = 200, width: n = 200 } = l;
341
340
  return k(t) ? /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "IMAGE URL", className: "h-36" }) : d.createElement("img", {
342
341
  ...e,
@@ -347,15 +346,15 @@ const Le = (l) => {
347
346
  width: n
348
347
  });
349
348
  };
350
- u(Le, {
349
+ u(Ie, {
351
350
  type: "Image",
352
351
  label: "Image",
353
352
  category: "core",
354
- icon: K,
353
+ icon: J,
355
354
  group: "basic",
356
355
  props: {
357
356
  styles: c({ default: "" }),
358
- image: E({
357
+ image: j({
359
358
  title: "Image",
360
359
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
361
360
  }),
@@ -364,7 +363,7 @@ u(Le, {
364
363
  height: f({ title: "Height", default: "" })
365
364
  }
366
365
  });
367
- const Te = (l) => {
366
+ const Le = (l) => {
368
367
  var r;
369
368
  const { blockProps: e, styles: t, children: o } = l;
370
369
  let s = null;
@@ -374,7 +373,7 @@ const Te = (l) => {
374
373
  l.name
375
374
  ] }) }) })), d.createElement("div", { ...t, ...e, droppable: "yes" }, o || s);
376
375
  };
377
- u(Te, {
376
+ u(Le, {
378
377
  type: "Slot",
379
378
  label: "Slot",
380
379
  group: "basic",
@@ -385,30 +384,30 @@ u(Te, {
385
384
  emptyStyles: c({ default: "" })
386
385
  }
387
386
  });
388
- const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, C = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, M = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, we = (l) => {
387
+ const P = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, C = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (l) => {
388
+ if (P.test(l)) {
389
+ const e = l.match(P);
390
+ return e ? `https://www.youtube.com/embed/${e[4]}` : l;
391
+ }
389
392
  if (N.test(l)) {
390
393
  const e = l.match(N);
391
- return e ? `https://www.youtube.com/embed/${e[4]}` : l;
394
+ return e ? `https://player.vimeo.com/video/${e[3]}` : l;
392
395
  }
393
396
  if (C.test(l)) {
394
397
  const e = l.match(C);
395
- return e ? `https://player.vimeo.com/video/${e[3]}` : l;
396
- }
397
- if (M.test(l)) {
398
- const e = l.match(M);
399
398
  return e ? `https://www.dailymotion.com/embed/video/${e[4]}` : l;
400
399
  }
401
400
  return null;
402
- }, Be = d.memo(
401
+ }, we = d.memo(
403
402
  (l) => {
404
- const { blockProps: e, inBuilder: t, styles: o, url: s, controls: r } = l, n = T(r, "autoPlay", !1), i = T(r, "controls", !1), p = n || T(r, "muted", !0), m = T(r, "loop", !1);
403
+ const { blockProps: e, inBuilder: t, styles: o, url: s, controls: r } = l, n = v(r, "autoPlay", !1), i = v(r, "controls", !1), p = n || v(r, "muted", !0), m = v(r, "loop", !1);
405
404
  if (k(s))
406
405
  return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "VIDEO URL", className: "h-36" });
407
- let y = we(s), b = null;
406
+ let y = Te(s), b = null;
408
407
  if (y) {
409
408
  if (!k(y)) {
410
- const L = [];
411
- L.push(`autoplay=${n ? 1 : 0}`), L.push(`controls=${r ? 1 : 0}`), L.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), L.push(`loop=${m ? 1 : 0}`), y = `${y}?${L.join("&")}`;
409
+ const T = [];
410
+ T.push(`autoplay=${n ? 1 : 0}`), T.push(`controls=${r ? 1 : 0}`), T.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), T.push(`loop=${m ? 1 : 0}`), y = `${y}?${T.join("&")}`;
412
411
  }
413
412
  b = d.createElement("iframe", {
414
413
  ...e,
@@ -428,17 +427,17 @@ const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
428
427
  autoPlay: t ? !1 : n,
429
428
  loop: m
430
429
  });
431
- return /* @__PURE__ */ a.jsxs("div", { className: "relative overflow-hidden w-full h-full", style: { paddingBottom: "56.25%" }, children: [
432
- t ? /* @__PURE__ */ a.jsx("div", { ...e, ...o, className: "absolute h-full w-full z-20" }) : null,
430
+ return /* @__PURE__ */ a.jsxs("div", { className: "relative h-full w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
431
+ t ? /* @__PURE__ */ a.jsx("div", { ...e, ...o, className: "absolute z-20 h-full w-full" }) : null,
433
432
  b
434
433
  ] });
435
434
  }
436
435
  );
437
- u(Be, {
436
+ u(we, {
438
437
  type: "Video",
439
438
  label: "Video",
440
439
  category: "core",
441
- icon: Q,
440
+ icon: K,
442
441
  group: "basic",
443
442
  props: {
444
443
  styles: c({ default: "absolute top-0 left-0 w-full h-full" }),
@@ -446,7 +445,7 @@ u(Be, {
446
445
  title: "Video URL",
447
446
  default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
448
447
  }),
449
- controls: D({
448
+ controls: $({
450
449
  title: "Controls",
451
450
  properties: {
452
451
  autoPlay: h({ title: "Autoplay", default: !0 }),
@@ -457,7 +456,7 @@ u(Be, {
457
456
  })
458
457
  }
459
458
  });
460
- const _e = d.memo(
459
+ const Be = d.memo(
461
460
  (l) => {
462
461
  const { blockProps: e, styles: t, content: o, inBuilder: s } = l;
463
462
  return /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
@@ -469,60 +468,60 @@ const _e = d.memo(
469
468
  ] });
470
469
  }
471
470
  );
472
- u(_e, {
471
+ u(Be, {
473
472
  type: "CustomHTML",
474
473
  label: "CustomHTML",
475
474
  category: "core",
476
- icon: ee,
475
+ icon: Q,
477
476
  group: "basic",
478
477
  props: {
479
478
  styles: c({ default: "" }),
480
- content: I({
479
+ content: L({
481
480
  title: "HTML Content",
482
481
  default: "<div><p>HTML Snippet goes here...</p></div>",
483
482
  placeholder: "Enter custom HTML code here"
484
483
  })
485
484
  }
486
485
  });
487
- const Se = (l) => {
486
+ const _e = (l) => {
488
487
  const { blockProps: e, styles: t } = l;
489
488
  return d.createElement("hr", { ...t, ...e });
490
489
  };
491
- u(Se, {
490
+ u(_e, {
492
491
  type: "Divider",
493
492
  label: "Divider",
494
493
  category: "core",
495
- icon: te,
494
+ icon: ee,
496
495
  group: "basic",
497
496
  props: {
498
497
  styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
499
498
  }
500
499
  });
501
- const je = (l) => {
500
+ const Se = (l) => {
502
501
  const { blockProps: e, styles: t } = l;
503
502
  return d.createElement("br", { ...e, ...t });
504
503
  };
505
- u(je, {
504
+ u(Se, {
506
505
  type: "LineBreak",
507
506
  label: "Line Break",
508
507
  category: "core",
509
508
  group: "basic",
510
509
  hidden: !0,
511
- icon: z,
510
+ icon: F,
512
511
  props: {
513
512
  styles: c({ default: "" })
514
513
  }
515
514
  });
516
- const Ee = (l) => l.inBuilder ? /* @__PURE__ */ a.jsx("span", { className: "inline", ...l.blockProps, children: l.content }) : `${l.content}`;
517
- u(Ee, {
515
+ const je = (l) => l.inBuilder ? /* @__PURE__ */ a.jsx("span", { className: "inline", ...l.blockProps, children: l.content }) : `${l.content}`;
516
+ u(je, {
518
517
  type: "Text",
519
518
  label: "Text",
520
519
  hidden: !0,
521
520
  category: "core",
522
521
  group: "basic",
523
- icon: z,
522
+ icon: F,
524
523
  props: {
525
- content: I({ title: "Content", defaultValue: "" })
524
+ content: L({ title: "Content", defaultValue: "" })
526
525
  }
527
526
  });
528
527
  const _ = (l) => {
@@ -567,71 +566,71 @@ const _ = (l) => {
567
566
  ];
568
567
  }
569
568
  return l === "TableRow" ? t() : l === "TableHead" ? o() : l === "TableBody" ? s() : [];
570
- }, Pe = (l) => {
569
+ }, Ee = (l) => {
571
570
  const { blockProps: e, children: t, styles: o } = l;
572
571
  return t ? d.createElement("table", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE HEAD / BODY" });
573
572
  };
574
- u(Pe, {
573
+ u(Ee, {
575
574
  type: "Table",
576
575
  label: "Table",
577
576
  category: "core",
578
577
  group: "table",
579
578
  hidden: !0,
580
- icon: le,
579
+ icon: te,
581
580
  props: {
582
581
  styles: c({ default: "" })
583
582
  },
584
583
  blocks: _("Table")
585
584
  });
586
- const Ne = (l) => {
585
+ const Pe = (l) => {
587
586
  const { blockProps: e, children: t, styles: o } = l;
588
587
  return t ? d.createElement("thead", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
589
588
  };
590
- u(Ne, {
589
+ u(Pe, {
591
590
  type: "TableHead",
592
591
  label: "Table Head",
593
592
  category: "core",
594
593
  group: "table",
595
594
  hidden: !0,
596
- icon: oe,
595
+ icon: le,
597
596
  props: {
598
597
  styles: c({ default: "" })
599
598
  },
600
599
  blocks: _("TableHead")
601
600
  });
602
- const Ce = (l) => {
601
+ const Ne = (l) => {
603
602
  const { blockProps: e, children: t, styles: o } = l;
604
603
  return t ? d.createElement("tbody", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE ROW" });
605
604
  };
606
- u(Ce, {
605
+ u(Ne, {
607
606
  type: "TableBody",
608
607
  label: "Table Body",
609
608
  category: "core",
610
609
  group: "table",
611
610
  hidden: !0,
612
- icon: re,
611
+ icon: oe,
613
612
  props: {
614
613
  styles: c({ default: "" })
615
614
  },
616
615
  blocks: _("TableBody")
617
616
  });
618
- const Me = (l) => {
617
+ const Ce = (l) => {
619
618
  const { blockProps: e, children: t, styles: o } = l;
620
619
  return t ? d.createElement("tr", { ...e, ...o }, t) : /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "TABLE CELL" });
621
620
  };
622
- u(Me, {
621
+ u(Ce, {
623
622
  type: "TableRow",
624
623
  label: "Table Row",
625
624
  category: "core",
626
625
  group: "table",
627
626
  hidden: !0,
628
- icon: se,
627
+ icon: re,
629
628
  props: {
630
629
  styles: c({ default: "w-full" })
631
630
  },
632
631
  blocks: _("TableRow")
633
632
  });
634
- const He = (l) => {
633
+ const Me = (l) => {
635
634
  const { blockProps: e, children: t, content: o, styles: s } = l;
636
635
  return !t && k(o) ? /* @__PURE__ */ a.jsx(g, { blockProps: e }) : t ? d.createElement("td", { ...e, ...s }, t) : d.createElement("td", {
637
636
  ...e,
@@ -639,19 +638,19 @@ const He = (l) => {
639
638
  dangerouslySetInnerHTML: { __html: o }
640
639
  });
641
640
  };
642
- u(He, {
641
+ u(Me, {
643
642
  type: "TableCell",
644
643
  label: "Table Cell",
645
644
  category: "core",
646
645
  group: "table",
647
646
  hidden: !0,
648
- icon: ae,
647
+ icon: se,
649
648
  props: {
650
649
  styles: c({ default: "" }),
651
650
  content: w({ title: "Content", default: "Table cell item" })
652
651
  }
653
652
  });
654
- const Re = (l) => {
653
+ const He = (l) => {
655
654
  const { blockProps: e, errorMessage: t, name: o, _type: s, successMessage: r, action: n, styles: i, children: p } = l;
656
655
  if (!p && k(i == null ? void 0 : i.className))
657
656
  return /* @__PURE__ */ a.jsx(g, { blockProps: e, text: "FORM FIELDS" });
@@ -680,11 +679,11 @@ const Re = (l) => {
680
679
  }
681
680
  );
682
681
  };
683
- u(Re, {
682
+ u(He, {
684
683
  type: "Form",
685
684
  label: "Form",
686
685
  category: "core",
687
- icon: ne,
686
+ icon: ae,
688
687
  group: "form",
689
688
  hidden: !0,
690
689
  props: {
@@ -703,18 +702,18 @@ u(Re, {
703
702
  })
704
703
  }
705
704
  });
706
- const Fe = (l) => {
705
+ const Re = (l) => {
707
706
  const { blockProps: e, content: t, styles: o, children: s } = l, r = { ...o, ...e };
708
707
  return s ? d.createElement("label", r, s) : d.createElement("label", {
709
708
  ...r,
710
709
  dangerouslySetInnerHTML: { __html: t }
711
710
  });
712
711
  };
713
- u(Fe, {
712
+ u(Re, {
714
713
  type: "Label",
715
714
  label: "Label",
716
715
  category: "core",
717
- icon: ie,
716
+ icon: ne,
718
717
  group: "form",
719
718
  hidden: !0,
720
719
  props: {
@@ -722,7 +721,7 @@ u(Fe, {
722
721
  content: f({ title: "Content", default: "Label" })
723
722
  }
724
723
  });
725
- const ze = (l) => {
724
+ const Fe = (l) => {
726
725
  const {
727
726
  blockProps: e,
728
727
  label: t,
@@ -764,19 +763,19 @@ const ze = (l) => {
764
763
  )
765
764
  ] });
766
765
  };
767
- u(ze, {
766
+ u(Fe, {
768
767
  type: "Input",
769
768
  label: "Input",
770
769
  category: "core",
771
- icon: A,
770
+ icon: z,
772
771
  group: "form",
773
772
  hidden: !0,
774
773
  props: {
775
774
  styles: c({ default: "" }),
776
775
  fieldName: f({ title: "Field Name", default: "input" }),
777
- inputType: v({
776
+ inputType: I({
778
777
  title: "Type",
779
- options: j(
778
+ options: S(
780
779
  ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
781
780
  (l) => ({
782
781
  value: l,
@@ -796,7 +795,7 @@ u(ze, {
796
795
  required: h({ title: "Required", default: !1 })
797
796
  }
798
797
  });
799
- const Ae = (l) => {
798
+ const ze = (l) => {
800
799
  const { blockProps: e, fieldName: t, label: o, placeholder: s, styles: r, inputStyles: n, _rows: i, showLabel: p } = l, m = x();
801
800
  return p ? /* @__PURE__ */ a.jsxs("div", { ...r, ...e, children: [
802
801
  p && /* @__PURE__ */ a.jsx("label", { htmlFor: m, children: o }),
@@ -814,11 +813,11 @@ const Ae = (l) => {
814
813
  }
815
814
  );
816
815
  };
817
- u(Ae, {
816
+ u(ze, {
818
817
  type: "TextArea",
819
818
  label: "TextArea",
820
819
  category: "core",
821
- icon: A,
820
+ icon: z,
822
821
  group: "form",
823
822
  hidden: !0,
824
823
  props: {
@@ -831,10 +830,10 @@ u(Ae, {
831
830
  title: "Placeholder",
832
831
  default: "Placeholder"
833
832
  }),
834
- _rows: R({ title: "Rows", default: 3 })
833
+ _rows: H({ title: "Rows", default: 3 })
835
834
  }
836
835
  });
837
- const De = (l) => {
836
+ const Ae = (l) => {
838
837
  const {
839
838
  blockProps: e,
840
839
  fieldName: t,
@@ -859,10 +858,10 @@ const De = (l) => {
859
858
  name: t,
860
859
  children: [
861
860
  /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
862
- j(l.options, (b) => /* @__PURE__ */ a.jsx(
861
+ S(l.options, (b) => /* @__PURE__ */ a.jsx(
863
862
  "option",
864
863
  {
865
- selected: S(b, "selected", !1),
864
+ selected: v(b, "selected", !1),
866
865
  value: b.value,
867
866
  dangerouslySetInnerHTML: { __html: b.label }
868
867
  },
@@ -883,10 +882,10 @@ const De = (l) => {
883
882
  name: t,
884
883
  children: [
885
884
  /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
886
- j(l.options, (b) => /* @__PURE__ */ a.jsx(
885
+ S(l.options, (b) => /* @__PURE__ */ a.jsx(
887
886
  "option",
888
887
  {
889
- selected: S(b, "selected", !1),
888
+ selected: v(b, "selected", !1),
890
889
  value: b.value,
891
890
  dangerouslySetInnerHTML: { __html: b.label }
892
891
  },
@@ -896,11 +895,11 @@ const De = (l) => {
896
895
  }
897
896
  );
898
897
  };
899
- u(De, {
898
+ u(Ae, {
900
899
  type: "Select",
901
900
  label: "Select",
902
901
  category: "core",
903
- icon: ce,
902
+ icon: ie,
904
903
  group: "form",
905
904
  hidden: !0,
906
905
  props: {
@@ -915,7 +914,7 @@ u(De, {
915
914
  }),
916
915
  required: h({ title: "Required", default: !1 }),
917
916
  _multiple: h({ title: "Multiple Choice", default: !1 }),
918
- options: q({
917
+ options: O({
919
918
  title: "Options",
920
919
  itemProperties: {
921
920
  label: f({ title: "Label", default: "" }),
@@ -924,7 +923,7 @@ u(De, {
924
923
  })
925
924
  }
926
925
  });
927
- const qe = (l) => {
926
+ const De = (l) => {
928
927
  const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, required: n, checked: i, showLabel: p = !0 } = l, m = x();
929
928
  return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
930
929
  /* @__PURE__ */ a.jsx(
@@ -952,11 +951,11 @@ const qe = (l) => {
952
951
  }
953
952
  );
954
953
  };
955
- u(qe, {
954
+ u(De, {
956
955
  type: "Checkbox",
957
956
  label: "Checkbox",
958
957
  category: "core",
959
- icon: de,
958
+ icon: ce,
960
959
  group: "form",
961
960
  hidden: !0,
962
961
  props: {
@@ -967,7 +966,7 @@ u(qe, {
967
966
  required: h({ title: "Required", default: !1 })
968
967
  }
969
968
  });
970
- const $e = (l) => {
969
+ const qe = (l) => {
971
970
  const { blockProps: e, fieldName: t, label: o, styles: s, inputStyles: r, checked: n, required: i, showLabel: p = !0 } = l, m = x();
972
971
  return p ? /* @__PURE__ */ a.jsxs("div", { ...s, ...e, children: [
973
972
  /* @__PURE__ */ a.jsx("input", { ...r, name: t, id: m, type: "radio", required: i, defaultChecked: n }),
@@ -986,11 +985,11 @@ const $e = (l) => {
986
985
  }
987
986
  );
988
987
  };
989
- u($e, {
988
+ u(qe, {
990
989
  type: "Radio",
991
990
  label: "Radio",
992
991
  category: "core",
993
- icon: ue,
992
+ icon: de,
994
993
  group: "form",
995
994
  hidden: !0,
996
995
  props: {
@@ -1001,7 +1000,7 @@ u($e, {
1001
1000
  required: h({ title: "Required", default: !1 })
1002
1001
  }
1003
1002
  });
1004
- const Oe = (l) => {
1003
+ const $e = (l) => {
1005
1004
  const { blockProps: e, inBuilder: t, label: o, placeholder: s, styles: r, inputStyles: n, icon: i, iconPos: p } = l, m = x(), y = {
1006
1005
  "x-bind:disabled": "formLoading"
1007
1006
  };
@@ -1022,11 +1021,11 @@ const Oe = (l) => {
1022
1021
  }
1023
1022
  );
1024
1023
  };
1025
- u(Oe, {
1024
+ u($e, {
1026
1025
  type: "FormButton",
1027
1026
  label: "Submit Button",
1028
1027
  category: "core",
1029
- icon: F,
1028
+ icon: R,
1030
1029
  group: "form",
1031
1030
  hidden: !0,
1032
1031
  props: {
@@ -1034,8 +1033,8 @@ u(Oe, {
1034
1033
  styles: c({
1035
1034
  default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
1036
1035
  }),
1037
- icon: P({ title: "Icon", default: "" }),
1038
- iconPos: v({
1036
+ icon: E({ title: "Icon", default: "" }),
1037
+ iconPos: I({
1039
1038
  title: "Icon Position",
1040
1039
  default: "order-last",
1041
1040
  options: [
@@ -1045,7 +1044,7 @@ u(Oe, {
1045
1044
  })
1046
1045
  }
1047
1046
  });
1048
- const et = V;
1047
+ const Ke = q;
1049
1048
  export {
1050
- et as loadWebBlocks
1049
+ Ke as loadWebBlocks
1051
1050
  };