@chaibuilder/sdk 1.2.26 → 1.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/{AddBlocks-l1JENNvq.js → AddBlocks-0sW6gkCO.js} +5 -5
  2. package/dist/AddBlocks-YJPdSqcY.cjs +1 -0
  3. package/dist/{BrandingOptions-udtH5yJs.js → BrandingOptions--vgnQvD1.js} +8 -8
  4. package/dist/{BrandingOptions-DkpqGARR.cjs → BrandingOptions-RDn_Nhcq.cjs} +1 -1
  5. package/dist/CanvasArea-41QoxuLf.cjs +55 -0
  6. package/dist/CanvasArea-aii0PyU-.js +1179 -0
  7. package/dist/{Class-lGzsNBOK.js → Class-6Hz2KzYb.js} +1 -1
  8. package/dist/{Class-PoYusiA5.cjs → Class-Zc8hpE7f.cjs} +1 -1
  9. package/dist/{CurrentPage-tJUjXWdb.js → CurrentPage-06Iacwyp.js} +6 -6
  10. package/dist/{CurrentPage-Hl52iub_.cjs → CurrentPage-2W1pdAOG.cjs} +1 -1
  11. package/dist/ListTree-DnA8gj-7.js +314 -0
  12. package/dist/ListTree-pdQ14QJC.cjs +1 -0
  13. package/dist/MODIFIERS-YPHRtwrM.cjs +1 -0
  14. package/dist/{MODIFIERS-dytZ-osO.js → MODIFIERS-cBT31iqE.js} +3 -11
  15. package/dist/{PagesPanel-WzCocl6u.cjs → PagesPanel-PBFzPSNY.cjs} +1 -1
  16. package/dist/{PagesPanel-6rrLXEO-.js → PagesPanel-_1CDTUdE.js} +7 -7
  17. package/dist/{ProjectPanel-o7gdcwPn.cjs → ProjectPanel-755bbzEQ.cjs} +1 -1
  18. package/dist/{ProjectPanel-tz3bjdXy.js → ProjectPanel-pUMeIiUW.js} +7 -7
  19. package/dist/Settings-G9Xtqr7n.cjs +1 -0
  20. package/dist/{Settings-4s2LUVmC.js → Settings-dnO-s6x0.js} +596 -560
  21. package/dist/{SidePanels-3o6Okmvu.cjs → SidePanels-Gq2LdVuY.cjs} +1 -1
  22. package/dist/{SidePanels-bugFfInz.js → SidePanels-VxSXXkt_.js} +56 -56
  23. package/dist/{Topbar-pWzBEOed.js → Topbar-5zbOSGF6.js} +3 -3
  24. package/dist/{Topbar-CqW7G360.cjs → Topbar-J2tb4SA1.cjs} +1 -1
  25. package/dist/{UnsplashImages-qvwFbV-E.js → UnsplashImages-4WAWgA4s.js} +9 -9
  26. package/dist/{UnsplashImages-NGskB93R.cjs → UnsplashImages-XwjKheek.cjs} +1 -1
  27. package/dist/{UploadImages-9NapgXBq.js → UploadImages-PONIHtn6.js} +3 -3
  28. package/dist/{UploadImages-Oh7Glr9A.cjs → UploadImages-y7LAQVrT.cjs} +1 -1
  29. package/dist/{add-page-modal-k2Kb92HS.js → add-page-modal-4VrFvgEm.js} +7 -7
  30. package/dist/{add-page-modal--6TTBRYa.cjs → add-page-modal-jWcp0w-S.cjs} +1 -1
  31. package/dist/{confirm-alert-C4M9eF-o.cjs → confirm-alert-4OQlXZTJ.cjs} +1 -1
  32. package/dist/{confirm-alert-GUhZ_G8w.js → confirm-alert-j7b88hsW.js} +3 -3
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +4 -4
  35. package/dist/{delete-page-modal-zONvdebd.js → delete-page-modal--xHHdRAq.js} +6 -6
  36. package/dist/{delete-page-modal-cFoL-wdo.cjs → delete-page-modal-p6b0upz4.cjs} +1 -1
  37. package/dist/email-blocks.cjs +1 -1
  38. package/dist/email-blocks.js +1 -1
  39. package/dist/email.cjs +1 -1
  40. package/dist/email.js +4 -4
  41. package/dist/{form-STUz-6nE.js → form-_GJb9YcB.js} +1 -1
  42. package/dist/{form-lBQ_76Uw.cjs → form-jQj7E-hS.cjs} +1 -1
  43. package/dist/html-to-json-LJyJsnmZ.js +228 -0
  44. package/dist/html-to-json-vP1ESB_e.cjs +1 -0
  45. package/dist/{index-SkyM3d6Q.js → index-0QJwevON.js} +2 -2
  46. package/dist/index-12HbDLon.cjs +1 -0
  47. package/dist/{index-llTXLDGE.js → index-Eb5zyh2F.js} +4 -4
  48. package/dist/{index-mbyqq81O.cjs → index-KArv7pNz.cjs} +1 -1
  49. package/dist/{index-Gk6sASBd.js → index-UHaqEdws.js} +993 -957
  50. package/dist/{index-OB199Izc.cjs → index-mlMvwv2b.cjs} +2 -2
  51. package/dist/lib.cjs +1 -1
  52. package/dist/lib.js +4 -4
  53. package/dist/{page-viewer-Pdg9F5Hv.js → page-viewer-00Xx4u8e.js} +7 -7
  54. package/dist/{page-viewer-2kwnKM6v.cjs → page-viewer-SZNm7b1n.cjs} +1 -1
  55. package/dist/{project-general-setting-CnNL98NM.cjs → project-general-setting-C_pHNuZE.cjs} +1 -1
  56. package/dist/{project-general-setting-f8Ebsn6K.js → project-general-setting-asDxlmhZ.js} +7 -7
  57. package/dist/{project-seo-setting-pX34Qsym.js → project-seo-setting-DuAaDfDR.js} +4 -4
  58. package/dist/{project-seo-setting-mlxL_e2_.cjs → project-seo-setting-q2953ybQ.cjs} +1 -1
  59. package/dist/render.cjs +1 -1
  60. package/dist/render.js +1 -1
  61. package/dist/{single-page-detail-dpe5LT0M.js → single-page-detail-UNxXvhl4.js} +14 -14
  62. package/dist/{single-page-detail-XfzrGlzA.cjs → single-page-detail-oqj6zsLU.cjs} +1 -1
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.js +6 -6
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.js +9 -9
  67. package/dist/useCanvasSettings-MR0Glu1b.cjs +1 -0
  68. package/dist/useCanvasSettings-R6br4J9i.js +6 -0
  69. package/dist/web-blocks.cjs +33 -6
  70. package/dist/web-blocks.js +461 -388
  71. package/package.json +1 -1
  72. package/dist/AddBlocks-zPPKkeKs.cjs +0 -1
  73. package/dist/CanvasArea-h0W-Tyha.js +0 -951
  74. package/dist/CanvasArea-zme1r3Zi.cjs +0 -55
  75. package/dist/ListTree-WvTjY5rr.cjs +0 -1
  76. package/dist/ListTree-cZ-Ihlt3.js +0 -309
  77. package/dist/MODIFIERS-0g14w5RS.cjs +0 -1
  78. package/dist/Settings-AqoKwR92.cjs +0 -1
  79. package/dist/html-to-json-efmv1pCj.cjs +0 -1
  80. package/dist/html-to-json-ngX9ef2u.js +0 -185
  81. package/dist/index-h-hd6EvN.cjs +0 -1
@@ -1,32 +1,34 @@
1
- import { isNull as F, isEmpty as k, get as v, pick as z, omit as q, map as E, noop as O } from "lodash-es";
2
- import { j as s } from "./jsx-runtime-WbnYoNE9.js";
3
- import * as u from "react";
4
- import { S as i, s as w, o as P, g as I, m as _, u as h, T as C, c as T, q as V, b as U, r as b, h as Y } from "./controls-OfJWSEqC.js";
1
+ import { isNull as $, isEmpty as k, get as x, pick as z, omit as q, find as O, map as E, noop as V } from "lodash-es";
2
+ import { j as n } from "./jsx-runtime-WbnYoNE9.js";
3
+ import * as p from "react";
4
+ import { S as i, s as I, o as C, g as B, m as L, u as y, T as P, c as _, q as U, b as G, r as b, h as W } from "./controls-OfJWSEqC.js";
5
5
  import { registerChaiBlock as d } from "@chaibuilder/runtime";
6
- import { E as x } from "./empty-slot-ZBlsQi6m.js";
7
- import { HeadingIcon as G, TextIcon as W, CursorTextIcon as X, ButtonIcon as R, Link1Icon as Z, RowsIcon as K, ColumnsIcon as J, SketchLogoIcon as Q, ImageIcon as ee, VideoIcon as te, CodeIcon as le, DividerHorizontalIcon as oe, SpaceBetweenVerticallyIcon as D, TableIcon as re, BorderTopIcon as ae, BorderAllIcon as se, ViewHorizontalIcon as ne, DragHandleHorizontalIcon as ce, GroupIcon as ie, LetterCaseToggleIcon as de, CheckboxIcon as ue, InputIcon as $, RadiobuttonIcon as pe, DropdownMenuIcon as me } from "@radix-ui/react-icons";
8
- import { c as M, g } from "./Functions-7jnEwJyw.js";
9
- import { a as j } from "./STRINGS--j49GZJP.js";
6
+ import { E as v } from "./empty-slot-ZBlsQi6m.js";
7
+ import { HeadingIcon as Y, TextIcon as X, CursorTextIcon as Z, ButtonIcon as R, Link1Icon as J, RowsIcon as K, ColumnsIcon as Q, SketchLogoIcon as ee, ImageIcon as te, VideoIcon as le, CodeIcon as oe, DividerHorizontalIcon as se, SpaceBetweenVerticallyIcon as F, TableIcon as ae, BorderTopIcon as ne, BorderAllIcon as re, ViewHorizontalIcon as ce, DragHandleHorizontalIcon as ie, GroupIcon as de, LetterCaseToggleIcon as ue, CheckboxIcon as pe, InputIcon as D, RadiobuttonIcon as he, DropdownMenuIcon as ye } from "@radix-ui/react-icons";
8
+ import { c as S, g } from "./Functions-7jnEwJyw.js";
9
+ import { g as A } from "./html-to-json-LJyJsnmZ.js";
10
10
  import "./_commonjsHelpers-UyOWmZb0.js";
11
11
  import "clsx";
12
12
  import "tailwind-merge";
13
- const he = u.memo(
13
+ import "himalaya";
14
+ import "./STRINGS--j49GZJP.js";
15
+ const me = p.memo(
14
16
  (e) => {
15
- const { blockProps: t, inBuilder: l, backgroundImage: o, children: r, tag: a = "div", styles: n } = e;
16
- let c = r;
17
- r || (c = /* @__PURE__ */ s.jsx(x, { blockProps: {}, styles: {}, inBuilder: l }));
18
- let p = {};
19
- return o && (p = { backgroundImage: `url(${o})` }), u.createElement(a, { ...t, ...n, style: p }, c);
17
+ const { blockProps: t, inBuilder: l, backgroundImage: o, children: s, tag: a = "div", styles: r } = e;
18
+ let c = s;
19
+ s || (c = /* @__PURE__ */ n.jsx(v, { blockProps: {}, styles: {}, inBuilder: l }));
20
+ let u = {};
21
+ return o && (u = { backgroundImage: `url(${o})` }), p.createElement(a, { ...t, ...r, style: u }, c);
20
22
  }
21
23
  );
22
- d(he, {
24
+ d(me, {
23
25
  type: "Box",
24
26
  label: "Box",
25
27
  category: "core",
26
28
  group: "basic",
27
29
  props: {
28
30
  styles: i({ default: "" }),
29
- tag: w({
31
+ tag: I({
30
32
  title: "Tag",
31
33
  default: "div",
32
34
  options: [
@@ -49,26 +51,26 @@ d(he, {
49
51
  { value: "mark", title: "mark" }
50
52
  ]
51
53
  }),
52
- backgroundImage: P({ title: "Background Image" })
54
+ backgroundImage: C({ title: "Background Image" })
53
55
  },
54
56
  canAcceptBlock: () => !0
55
57
  });
56
- const ye = (e) => {
57
- const { blockProps: t, styles: l, content: o, level: r = "h1", children: a = null } = e;
58
- return a ? u.createElement(r, { ...l, ...t }, a) : u.createElement(r, {
58
+ const fe = (e) => {
59
+ const { blockProps: t, styles: l, content: o, level: s = "h1", children: a = null } = e;
60
+ return a ? p.createElement(s, { ...l, ...t }, a) : p.createElement(s, {
59
61
  ...l,
60
62
  ...t,
61
63
  dangerouslySetInnerHTML: { __html: o }
62
64
  });
63
65
  };
64
- d(ye, {
66
+ d(fe, {
65
67
  type: "Heading",
66
68
  label: "Heading",
67
69
  category: "core",
68
- icon: G,
70
+ icon: Y,
69
71
  group: "typography",
70
72
  props: {
71
- level: w({
73
+ level: I({
72
74
  title: "Level",
73
75
  default: "h1",
74
76
  binding: !1,
@@ -82,83 +84,83 @@ d(ye, {
82
84
  ]
83
85
  }),
84
86
  styles: i({ default: "text-3xl" }),
85
- content: I({ title: "Content", default: "Heading goes here" })
87
+ content: B({ title: "Content", default: "Heading goes here" })
86
88
  },
87
89
  canAcceptBlock: (e) => e === "Span" || e === "Text"
88
90
  });
89
- const fe = (e) => {
91
+ const be = (e) => {
90
92
  const { blockProps: t, styles: l, content: o } = e;
91
- return F(e.children) ? u.createElement("div", {
93
+ return $(e.children) ? p.createElement("p", {
92
94
  ...l,
93
95
  ...t,
94
96
  dangerouslySetInnerHTML: { __html: o }
95
- }) : u.createElement("p", { ...l, ...t }, e.children);
97
+ }) : p.createElement("p", { ...l, ...t }, e.children);
96
98
  };
97
- d(fe, {
99
+ d(be, {
98
100
  type: "Paragraph",
99
101
  label: "Paragraph",
100
102
  category: "core",
101
- icon: W,
103
+ icon: X,
102
104
  group: "typography",
103
105
  props: {
104
106
  styles: i({ default: "" }),
105
- content: I({
107
+ content: B({
106
108
  title: "Content",
107
109
  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."
108
110
  })
109
111
  },
110
112
  canAcceptBlock: (e) => e === "Span" || e === "Link"
111
113
  });
112
- const be = (e) => {
113
- const { blockProps: t, styles: l, content: o, children: r = null, tag: a } = e;
114
- return r ? u.createElement("span", { ...l, ...t }, r) : u.createElement(a || "span", {
114
+ const ge = (e) => {
115
+ const { blockProps: t, styles: l, content: o, children: s = null, tag: a } = e;
116
+ return s ? p.createElement("span", { ...l, ...t }, s) : p.createElement(a || "span", {
115
117
  ...l,
116
118
  ...t,
117
119
  dangerouslySetInnerHTML: { __html: o }
118
120
  });
119
121
  };
120
- d(be, {
122
+ d(ge, {
121
123
  type: "Span",
122
124
  label: "Span",
123
125
  category: "core",
124
126
  group: "typography",
125
127
  props: {
126
128
  styles: i({ default: "" }),
127
- content: I({ title: "Content", default: "Enter your content" })
129
+ content: B({ title: "Content", default: "Enter your content" })
128
130
  },
129
131
  canAcceptBlock: () => !0
130
132
  });
131
- const ge = (e) => {
133
+ const ve = (e) => {
132
134
  const { blockProps: t, content: l, styles: o } = e;
133
- return /* @__PURE__ */ s.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ s.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
135
+ return /* @__PURE__ */ n.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ n.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
134
136
  };
135
- d(ge, {
137
+ d(ve, {
136
138
  type: "RichText",
137
139
  label: "Rich Text",
138
140
  category: "core",
139
- icon: X,
141
+ icon: Z,
140
142
  group: "typography",
141
143
  props: {
142
144
  styles: i({ default: "" }),
143
- content: _({
145
+ content: L({
144
146
  title: "Content",
145
147
  default: "<p>This is a rich text block. You can add text, and other content here.</p>"
146
148
  })
147
149
  }
148
150
  });
149
151
  const xe = (e) => {
150
- const { blockProps: t, iconSize: l, icon: o, content: r, iconPos: a, styles: n, children: c } = e, p = o, m = c || /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
151
- /* @__PURE__ */ s.jsx("span", { children: r }),
152
- p && /* @__PURE__ */ s.jsx(
152
+ const { blockProps: t, iconSize: l, icon: o, content: s, iconPos: a, styles: r, children: c } = e, u = o, h = c || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
153
+ /* @__PURE__ */ n.jsx("span", { children: s }),
154
+ u && /* @__PURE__ */ n.jsx(
153
155
  "div",
154
156
  {
155
157
  style: { width: l + "px" },
156
158
  className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
157
- dangerouslySetInnerHTML: { __html: p }
159
+ dangerouslySetInnerHTML: { __html: u }
158
160
  }
159
161
  )
160
162
  ] });
161
- return u.createElement("button", { ...t, ...n, type: "button" }, m);
163
+ return p.createElement("button", { ...t, ...r, type: "button" }, h);
162
164
  };
163
165
  d(xe, {
164
166
  type: "Button",
@@ -167,11 +169,11 @@ d(xe, {
167
169
  icon: R,
168
170
  group: "basic",
169
171
  props: {
170
- content: h({ title: "Label", default: "Button", multiLingual: !0 }),
172
+ content: y({ title: "Label", default: "Button", multiLingual: !0 }),
171
173
  styles: i({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
172
- icon: C({ title: "Icon", default: "" }),
173
- iconSize: T({ title: "Icon Size", default: 24 }),
174
- iconPos: w({
174
+ icon: P({ title: "Icon", default: "" }),
175
+ iconSize: _({ title: "Icon Size", default: 24 }),
176
+ iconPos: I({
175
177
  title: "Icon Position",
176
178
  default: "order-last",
177
179
  options: [
@@ -182,45 +184,45 @@ d(xe, {
182
184
  }
183
185
  });
184
186
  const ke = (e) => {
185
- const { blockProps: t, link: l, children: o, styles: r, inBuilder: a, content: n } = e;
186
- return !o && k(r == null ? void 0 : r.className) && k(n) ? /* @__PURE__ */ s.jsx(x, { blockProps: t, inBuilder: a }) : a ? o ? /* @__PURE__ */ s.jsx("span", { "data-simulate": "a", ...t, ...r, children: o }) : u.createElement("span", {
187
+ const { blockProps: t, link: l, children: o, styles: s, inBuilder: a, content: r } = e;
188
+ return !o && k(s == null ? void 0 : s.className) && k(r) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, inBuilder: a }) : a ? o ? /* @__PURE__ */ n.jsx("span", { "data-simulate": "a", ...t, ...s, children: o }) : p.createElement("span", {
187
189
  ...t,
188
- ...r,
189
- dangerouslySetInnerHTML: { __html: n },
190
+ ...s,
191
+ dangerouslySetInnerHTML: { __html: r },
190
192
  "data-simulate": "a"
191
- }) : o ? /* @__PURE__ */ s.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...r, children: o }) : u.createElement("a", {
193
+ }) : o ? /* @__PURE__ */ n.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...s, children: o }) : p.createElement("a", {
192
194
  ...t,
193
- ...r,
195
+ ...s,
194
196
  href: l.href || "#",
195
197
  target: l.target || "_self",
196
- dangerouslySetInnerHTML: { __html: n }
198
+ dangerouslySetInnerHTML: { __html: r }
197
199
  });
198
200
  };
199
201
  d(ke, {
200
202
  type: "Link",
201
203
  label: "Link",
202
204
  category: "core",
203
- icon: Z,
205
+ icon: J,
204
206
  group: "basic",
205
207
  props: {
206
208
  styles: i({ default: "" }),
207
- content: h({ title: "Content", default: "" }),
208
- link: V({
209
+ content: y({ title: "Content", default: "" }),
210
+ link: U({
209
211
  title: "Link",
210
212
  default: { type: "page", target: "_self", href: "" }
211
213
  })
212
214
  },
213
215
  canAcceptBlock: () => !0
214
216
  });
215
- const ve = (e) => {
216
- const { blockProps: t, children: l, listType: o, styles: r, tag: a, inBuilder: n } = e, c = M(v(r, "className", ""), o);
217
- return !l && k(r == null ? void 0 : r.className) ? /* @__PURE__ */ s.jsx(x, { inBuilder: n, blockProps: t, text: "LIST ITEM" }) : u.createElement(
217
+ const we = (e) => {
218
+ const { blockProps: t, children: l, listType: o, styles: s, tag: a, inBuilder: r } = e, c = S(x(s, "className", ""), o);
219
+ return !l && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ n.jsx(v, { inBuilder: r, blockProps: t, text: "LIST ITEM" }) : p.createElement(
218
220
  a || (o === "list-decimal" ? "ol" : "ul"),
219
- { ...t, ...r, className: c },
221
+ { ...t, ...s, className: c },
220
222
  l
221
223
  );
222
224
  };
223
- d(ve, {
225
+ d(we, {
224
226
  type: "List",
225
227
  label: "List",
226
228
  icon: K,
@@ -228,7 +230,7 @@ d(ve, {
228
230
  group: "basic",
229
231
  props: {
230
232
  styles: i({ default: "" }),
231
- listType: w({
233
+ listType: I({
232
234
  title: "List type",
233
235
  default: "list-disc",
234
236
  options: [
@@ -264,99 +266,99 @@ d(ve, {
264
266
  }
265
267
  ]
266
268
  });
267
- const we = (e) => {
268
- const { blockProps: t, content: l, styles: o, children: r, tag: a } = e;
269
- return r ? u.createElement(a || "li", { ...o, ...t }, r) : u.createElement(a || "li", {
269
+ const Ie = (e) => {
270
+ const { blockProps: t, content: l, styles: o, children: s, tag: a } = e;
271
+ return s ? p.createElement(a || "li", { ...o, ...t }, s) : p.createElement(a || "li", {
270
272
  ...o,
271
273
  ...t,
272
274
  dangerouslySetInnerHTML: { __html: l }
273
275
  });
274
276
  };
275
- d(we, {
277
+ d(Ie, {
276
278
  type: "ListItem",
277
279
  label: "List Item",
278
- icon: J,
280
+ icon: Q,
279
281
  category: "core",
280
282
  group: "basic",
281
283
  props: {
282
284
  styles: i({ default: "" }),
283
- content: I({ title: "Content", default: "List item" })
285
+ content: B({ title: "Content", default: "List item" })
284
286
  },
285
287
  canAcceptBlock: () => !0,
286
288
  canBeNested: (e) => e === "List"
287
289
  });
288
- const L = (e, t) => ({
290
+ const w = (e, ...t) => ({
289
291
  ...e,
290
- className: `${e.className} ${t}`
291
- }), Ie = (e) => {
292
- const { blockProps: t, icon: l, styles: o, width: r, inBuilder: a, height: n } = e, c = L(
292
+ className: S(e.className, ...t)
293
+ }), Be = (e) => {
294
+ const { blockProps: t, icon: l, styles: o, width: s, inBuilder: a, height: r } = e, c = w(
293
295
  o,
294
- M("inline-block", r ? `w-[${r}px]` : "", n ? `h-[${n}px]` : "")
296
+ S("inline-block", s ? `w-[${s}px]` : "", r ? `h-[${r}px]` : "")
295
297
  );
296
298
  if (k(l))
297
- return /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
298
- const p = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
299
- return u.createElement("span", {
299
+ return /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
300
+ const u = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
301
+ return p.createElement("span", {
300
302
  ...t,
301
303
  ...c,
302
- dangerouslySetInnerHTML: { __html: p }
304
+ dangerouslySetInnerHTML: { __html: u }
303
305
  });
304
306
  };
305
- d(Ie, {
307
+ d(Be, {
306
308
  type: "Icon",
307
309
  label: "Icon",
308
310
  category: "core",
309
- icon: Q,
311
+ icon: ee,
310
312
  group: "media",
311
313
  props: {
312
314
  styles: i({ default: "text-black" }),
313
- icon: C({
315
+ icon: P({
314
316
  title: "Icon",
315
317
  default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
316
318
  }),
317
- width: T({ title: "Width", default: "" }),
318
- height: T({ title: "Height", default: "" })
319
+ width: _({ title: "Width", default: "" }),
320
+ height: _({ title: "Height", default: "" })
319
321
  }
320
322
  });
321
- const Be = (e) => {
322
- const { blockProps: t, image: l, styles: o, alt: r, height: a, width: n } = e;
323
- return k(l) ? /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : u.createElement("img", {
323
+ const Te = (e) => {
324
+ const { blockProps: t, image: l, styles: o, alt: s, height: a, width: r } = e;
325
+ return k(l) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : p.createElement("img", {
324
326
  ...t,
325
327
  ...o,
326
328
  src: l,
327
- alt: r,
329
+ alt: s,
328
330
  height: a,
329
- width: n
331
+ width: r
330
332
  });
331
333
  };
332
- d(Be, {
334
+ d(Te, {
333
335
  type: "Image",
334
336
  label: "Image",
335
337
  category: "core",
336
- icon: ee,
338
+ icon: te,
337
339
  group: "media",
338
340
  props: {
339
341
  styles: i({ default: "" }),
340
- image: P({
342
+ image: C({
341
343
  title: "Image",
342
344
  default: "https://fakeimg.pl/400x200?text=Choose&font=bebas"
343
345
  }),
344
- alt: h({ title: "Alt", default: "" }),
345
- width: h({ title: "Width", default: "" }),
346
- height: h({ title: "Height", default: "" })
346
+ alt: y({ title: "Alt", default: "" }),
347
+ width: y({ title: "Width", default: "" }),
348
+ height: y({ title: "Height", default: "" })
347
349
  }
348
350
  });
349
- const _e = (e) => {
350
- var n;
351
- const { blockProps: t, inBuilder: l, styles: o, children: r } = e;
351
+ const Le = (e) => {
352
+ var r;
353
+ const { blockProps: t, inBuilder: l, styles: o, children: s } = e;
352
354
  let a = null;
353
- return !r && l && (a = // @ts-ignore
354
- /* @__PURE__ */ s.jsx("div", { className: M("flex flex-col items-center justify-center", (n = e.emptyStyles) == null ? void 0 : n.className), children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ s.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
355
+ return !s && l && (a = // @ts-ignore
356
+ /* @__PURE__ */ n.jsx("div", { className: S("flex flex-col items-center justify-center", (r = e.emptyStyles) == null ? void 0 : r.className), children: /* @__PURE__ */ n.jsx("div", { className: "h-full w-full rounded-md border-4 border-dashed", children: /* @__PURE__ */ n.jsxs("p", { className: "truncate p-1 text-left text-xs text-gray-400", children: [
355
357
  "Slot: ",
356
358
  e.name
357
- ] }) }) })), u.createElement("div", { ...o, ...t, droppable: "yes" }, r || a);
359
+ ] }) }) })), p.createElement("div", { ...o, ...t, droppable: "yes" }, s || a);
358
360
  };
359
- d(_e, {
361
+ d(Le, {
360
362
  type: "Slot",
361
363
  label: "Slot",
362
364
  group: "basic",
@@ -368,13 +370,13 @@ d(_e, {
368
370
  },
369
371
  canAcceptBlock: () => !0
370
372
  });
371
- const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, A = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, H = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, Te = (e) => {
373
+ const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, M = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, H = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, _e = (e) => {
372
374
  if (N.test(e)) {
373
375
  const t = e.match(N);
374
376
  return t ? `https://www.youtube.com/embed/${t[4]}` : e;
375
377
  }
376
- if (A.test(e)) {
377
- const t = e.match(A);
378
+ if (M.test(e)) {
379
+ const t = e.match(M);
378
380
  return t ? `https://player.vimeo.com/video/${t[3]}` : e;
379
381
  }
380
382
  if (H.test(e)) {
@@ -382,18 +384,18 @@ const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
382
384
  return t ? `https://www.dailymotion.com/embed/video/${t[4]}` : e;
383
385
  }
384
386
  return null;
385
- }, Le = u.memo(
387
+ }, Se = p.memo(
386
388
  (e) => {
387
- const { blockProps: t, inBuilder: l, styles: o, url: r, controls: a } = e, n = v(a, "autoPlay", !1), c = v(a, "controls", !1), p = n || v(a, "muted", !0), m = v(a, "loop", !1);
388
- if (k(r))
389
- return /* @__PURE__ */ s.jsx(x, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
390
- let f = Te(r), y = null;
389
+ const { blockProps: t, inBuilder: l, styles: o, url: s, controls: a } = e, r = x(a, "autoPlay", !1), c = x(a, "controls", !1), u = r || x(a, "muted", !0), h = x(a, "loop", !1);
390
+ if (k(s))
391
+ return /* @__PURE__ */ n.jsx(v, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
392
+ let f = _e(s), m = null;
391
393
  if (f) {
392
394
  if (!k(f)) {
393
- const B = [];
394
- B.push(`autoplay=${n ? 1 : 0}`), B.push(`controls=${a ? 1 : 0}`), B.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), B.push(`loop=${m ? 1 : 0}`), f = `${f}?${B.join("&")}`;
395
+ const T = [];
396
+ T.push(`autoplay=${r ? 1 : 0}`), T.push(`controls=${a ? 1 : 0}`), T.push(`mute=${u ? 1 : 0}&muted=${u ? 1 : 0}`), T.push(`loop=${h ? 1 : 0}`), f = `${f}?${T.join("&")}`;
395
397
  }
396
- y = u.createElement("iframe", {
398
+ m = p.createElement("iframe", {
397
399
  ...t,
398
400
  className: "absolute inset-0 w-full h-full",
399
401
  src: f,
@@ -402,34 +404,34 @@ const N = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
402
404
  frameBorder: 0
403
405
  });
404
406
  } else
405
- y = u.createElement("video", {
407
+ m = p.createElement("video", {
406
408
  ...t,
407
409
  className: "absolute inset-0 w-full h-full",
408
- src: r,
410
+ src: s,
409
411
  controls: c,
410
- muted: p,
411
- autoPlay: l ? !1 : n,
412
- loop: m
412
+ muted: u,
413
+ autoPlay: l ? !1 : r,
414
+ loop: h
413
415
  });
414
- return /* @__PURE__ */ s.jsx("div", { ...z(o, ["className"]), children: /* @__PURE__ */ s.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
415
- l ? /* @__PURE__ */ s.jsx("div", { ...t, ...q(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
416
- y
416
+ return /* @__PURE__ */ n.jsx("div", { ...z(o, ["className"]), children: /* @__PURE__ */ n.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
417
+ l ? /* @__PURE__ */ n.jsx("div", { ...t, ...q(o, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
418
+ m
417
419
  ] }) });
418
420
  }
419
421
  );
420
- d(Le, {
422
+ d(Se, {
421
423
  type: "Video",
422
424
  label: "Video",
423
425
  category: "core",
424
- icon: te,
426
+ icon: le,
425
427
  group: "media",
426
428
  props: {
427
429
  styles: i({ default: "" }),
428
- url: h({
430
+ url: y({
429
431
  title: "Video URL",
430
432
  default: "https://www.youtube.com/watch?v=9xwazD5SyVg&ab_channel=MaximilianMustermann"
431
433
  }),
432
- controls: U({
434
+ controls: G({
433
435
  title: "Controls",
434
436
  properties: {
435
437
  autoPlay: b({ title: "Autoplay", default: !0 }),
@@ -440,128 +442,140 @@ d(Le, {
440
442
  })
441
443
  }
442
444
  });
443
- const Se = u.memo(
445
+ const je = p.memo(
444
446
  (e) => {
445
- const { blockProps: t, styles: l, content: o, inBuilder: r } = e;
446
- return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
447
- r ? /* @__PURE__ */ s.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
448
- u.createElement("div", {
447
+ const { blockProps: t, styles: l, content: o, inBuilder: s } = e;
448
+ return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
449
+ s ? /* @__PURE__ */ n.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
450
+ p.createElement("div", {
449
451
  ...l,
450
452
  dangerouslySetInnerHTML: { __html: o }
451
453
  })
452
454
  ] });
453
455
  }
454
456
  );
455
- d(Se, {
457
+ d(je, {
456
458
  type: "CustomHTML",
457
459
  label: "Custom HTML",
458
460
  category: "core",
459
- icon: le,
461
+ icon: oe,
460
462
  group: "advanced",
461
463
  props: {
462
464
  styles: i({ default: "" }),
463
- content: I({
465
+ content: B({
464
466
  title: "HTML Content",
465
467
  default: "<div><p>HTML Snippet goes here...</p></div>",
466
468
  placeholder: "Enter custom HTML code here"
467
469
  })
468
470
  }
469
471
  });
470
- const je = (e) => {
472
+ const Ee = (e) => {
471
473
  const { blockProps: t, styles: l } = e;
472
- return u.createElement("hr", { ...l, ...t });
474
+ return p.createElement("hr", { ...l, ...t });
473
475
  };
474
- d(je, {
476
+ d(Ee, {
475
477
  type: "Divider",
476
478
  label: "Divider",
477
479
  category: "core",
478
- icon: oe,
480
+ icon: se,
479
481
  group: "basic",
480
482
  props: {
481
483
  styles: i({ default: "bg-gray-900 h-0.5 py-2 my-1" })
482
484
  }
483
485
  });
484
- const Ee = (e) => e.inBuilder ? /* @__PURE__ */ s.jsx("span", { className: "flex", ...e.blockProps, children: e.content }) : `${e.content}`;
485
- d(Ee, {
486
+ const Ce = (e) => e.inBuilder ? /* @__PURE__ */ n.jsx("span", { className: "inline-block", ...e.blockProps, children: e.content }) : `${e.content}`;
487
+ d(Ce, {
486
488
  type: "Text",
487
489
  label: "Text",
488
490
  hidden: !0,
489
491
  category: "core",
490
492
  group: "typography",
491
- icon: D,
493
+ icon: F,
492
494
  props: {
493
- content: I({ title: "Content", defaultValue: "" })
495
+ content: B({ title: "Content", defaultValue: "" })
494
496
  }
495
497
  });
496
498
  const Pe = ({ children: e, blockProps: t, styles: l }) => {
497
- const o = L(l, "hs-accordion");
498
- return /* @__PURE__ */ s.jsx("div", { ...t, ...o, children: e });
499
+ const o = w(l, "hs-accordion-group");
500
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...o, children: e });
499
501
  };
500
502
  d(Pe, {
501
- type: "Accordion",
502
- label: "Accordion",
503
+ type: "AccordionGroup",
504
+ label: "Accordion Group",
503
505
  category: "core",
504
506
  group: "advanced",
505
- hidden: !0,
506
507
  props: {
507
508
  styles: i({ default: "" })
508
509
  },
509
510
  // @ts-ignore
510
511
  blocks: () => {
511
- const e = "accordion" + g();
512
- return [
513
- { _id: "a", _type: "Accordion", _name: "Accordion" },
514
- {
515
- _id: "b",
516
- _type: "AccordionTrigger",
517
- _parent: "a",
518
- _name: "Accordion Trigger",
519
- styles_attrs: { "aria-controls": e }
520
- },
521
- {
522
- _id: "b1",
523
- _type: "Icon",
524
- _parent: "b",
525
- styles: `${j},hs-accordion-active:hidden hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 block size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,
526
- icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
527
- <path d="M5 12h14"></path>
528
- <path d="M12 5v14"></path>
529
- </svg>`
530
- },
531
- {
532
- _id: "b2",
533
- _type: "Icon",
534
- _parent: "b",
535
- styles: `${j},hs-accordion-active:block hs-accordion-active:text-blue-600 hs-accordion-active:group-hover:text-blue-600 hidden size-4 text-gray-600 group-hover:text-gray-500 dark:text-neutral-400`,
536
- icon: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
537
- <path d="M5 12h14"></path>
538
- </svg>`
539
- },
540
- { _id: "b1", _type: "Text", _parent: "b", content: "Accordion Title" },
541
- {
542
- _id: "c",
543
- _type: "AccordionContent",
544
- _parent: "a",
545
- _name: "Accordion Content",
546
- styles: `${j},w-full overflow-hidden transition-[height] duration-300 px-6 py-3`,
547
- styles_attrs: { "aria-labelledby": e }
548
- },
549
- {
550
- _id: "c1",
551
- _type: "Text",
552
- _parent: "c",
553
- content: "It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element."
554
- }
555
- ];
512
+ const e = "dnd-accordion-" + g();
513
+ return A(`<div class="hs-accordion-group">
514
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
515
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
516
+ Accordion #1
517
+ </button>
518
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
519
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
520
+ </div>
521
+ </div>
522
+
523
+ <div class="hs-accordion" id="hs-unstyled-heading-two">
524
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-two">
525
+ Accordion #2
526
+ </button>
527
+ <div id="hs-unstyled-collapse-two" class="hs-accordion-content hidden overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-two">
528
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
529
+ </div>
530
+ </div>
531
+ </div>`.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
532
+ },
533
+ canAcceptBlock: (e) => e === "Accordion"
534
+ });
535
+ const Ae = ({ children: e, blockProps: t, styles: l, blockState: o }) => {
536
+ const s = w(
537
+ l,
538
+ "hs-accordion " + (o && o != null && o.active ? "active" : "")
539
+ );
540
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...s, children: e });
541
+ };
542
+ d(Ae, {
543
+ type: "Accordion",
544
+ label: "Accordion",
545
+ category: "core",
546
+ group: "advanced",
547
+ props: { styles: i({ default: "" }) },
548
+ //@ts-ignore
549
+ customStylingStates: {
550
+ "hs-accordion-active": "Accordion Active"
551
+ },
552
+ //@ts-ignore
553
+ blockState: {
554
+ active: b({ default: !1, title: "Show content in canvas" })
555
+ },
556
+ getBlockStateFrom: (e) => [e._id],
557
+ // @ts-ignore
558
+ blocks: () => {
559
+ const e = "dnd-accordion-" + g();
560
+ return A(`
561
+ <div class="hs-accordion active" id="hs-unstyled-heading-one">
562
+ <button class="hs-accordion-toggle" aria-controls="hs-unstyled-collapse-one">
563
+ Accordion #1
564
+ </button>
565
+ <div id="hs-unstyled-collapse-one" class="hs-accordion-content overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-heading-one">
566
+ It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element.
567
+ </div>
568
+ </div>
569
+ `.replace(/hs-unstyled-heading/g, e).replace(/hs-unstyled-collapse/g, e));
556
570
  }
557
571
  });
558
- const Ce = ({ children: e, blockProps: t, styles: l }) => {
559
- const o = L(l, "hs-accordion-toggle");
560
- return /* @__PURE__ */ s.jsx("button", { ...o, ...t, children: e });
572
+ const Ne = ({ children: e, blockProps: t, styles: l }) => {
573
+ const o = w(l, "hs-accordion-toggle");
574
+ return /* @__PURE__ */ n.jsx("button", { ...o, ...t, children: e });
561
575
  };
562
- d(Ce, {
563
- type: "AccordionTrigger",
564
- label: "Accordion Trigger",
576
+ d(Ne, {
577
+ type: "AccordionToggle",
578
+ label: "Accordion Toggle",
565
579
  category: "core",
566
580
  group: "advanced",
567
581
  hidden: !0,
@@ -575,9 +589,13 @@ d(Ce, {
575
589
  canMove: () => !1,
576
590
  canDuplicate: () => !1
577
591
  });
578
- const Me = ({ children: e, blockProps: t, styles: l }) => {
579
- const o = L(l, "hs-accordion-content");
580
- return /* @__PURE__ */ s.jsx("div", { ...o, ...t, children: e });
592
+ const Me = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
593
+ const a = w(
594
+ l,
595
+ "hs-accordion-content",
596
+ s && o ? o != null && o.active ? "!block !opacity-100" : "!hidden !opacity-0" : ""
597
+ );
598
+ return /* @__PURE__ */ n.jsx("div", { ...a, ...t, children: e });
581
599
  };
582
600
  d(Me, {
583
601
  type: "AccordionContent",
@@ -586,19 +604,74 @@ d(Me, {
586
604
  group: "advanced",
587
605
  hidden: !0,
588
606
  props: {
589
- styles: i({ default: "w-full overflow-hidden transition-[height] duration-300" })
607
+ styles: i({ default: "w-full overflow-hidden transition-height hidden duration-300" })
590
608
  },
609
+ //@ts-ignore
610
+ getBlockStateFrom: (e) => [e._parent],
591
611
  canAcceptBlock: () => !0,
592
612
  canDelete: () => !1,
593
613
  canMove: () => !1,
594
614
  canDuplicate: () => !1
595
615
  });
596
- const Ne = (e) => {
597
- const { blockProps: t, backgroundImage: l, children: o, styles: r } = e;
616
+ const He = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
617
+ const a = s && (o != null && o.active) ? " open" : "", r = w(l, "hs-collapse-toggle", a);
618
+ return /* @__PURE__ */ n.jsx("button", { type: "button", ...r, ...t, children: e });
619
+ };
620
+ d(He, {
621
+ type: "CollapseToggle",
622
+ label: "Collapse Toggle",
623
+ category: "core",
624
+ group: "advanced",
625
+ hidden: !0,
626
+ props: { styles: i({ default: "" }) },
627
+ canAcceptBlock: () => !0,
628
+ //@ts-ignore
629
+ customStylingStates: {
630
+ "hs-collapse-open": "Collapse Open"
631
+ },
632
+ // @ts-ignore
633
+ getBlockStateFrom: (e, t) => {
634
+ const l = x(e, "styles_attrs.data-hs-collapse", "").replace("#", "");
635
+ if (!l)
636
+ return [];
637
+ const o = O(t, (s) => x(s, "styles_attrs.id") === l);
638
+ return o ? [o == null ? void 0 : o._id] : [];
639
+ }
640
+ });
641
+ const Re = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
642
+ const a = s ? { "!block !opacity-100 open": o == null ? void 0 : o.active, "hidden opacity-0": !(o != null && o.active) } : {}, r = Object.keys(a).filter((u) => a[u]).join(" "), c = w(l, "hs-collapse", r);
643
+ return /* @__PURE__ */ n.jsx("div", { ...c, ...t, children: e });
644
+ };
645
+ d(Re, {
646
+ type: "Collapse",
647
+ label: "Collapse",
648
+ category: "core",
649
+ group: "advanced",
650
+ props: {
651
+ styles: i({
652
+ default: "transition-opacity transition-margin duration hs-collapse-open:opacity-100 opacity-0 w-56 hidden z-10 mt-2 min-w-60 bg-white"
653
+ })
654
+ },
655
+ canAcceptBlock: () => !0,
656
+ //@ts-ignore
657
+ blockState: {
658
+ active: b({ default: !1, title: "Show collapse in canvas" })
659
+ },
660
+ getBlockStateFrom: (e) => [e._id],
661
+ // @ts-ignore
662
+ blocks: () => A(`<button type="button" class="hs-collapse-toggle" id="hs-unstyled-collapse" data-hs-collapse="#hs-unstyled-collapse-content">
663
+ Collapse
664
+ </button>
665
+ <div id="hs-unstyled-collapse-content" class="hs-collapse hidden w-full overflow-hidden transition-[height] duration-300" aria-labelledby="hs-unstyled-collapse">
666
+ This is a collapse body. It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions.
667
+ </div>`.replace(/hs-unstyled-collapse/g, `dnd-collapse-${g()}`))
668
+ });
669
+ const Fe = (e) => {
670
+ const { blockProps: t, backgroundImage: l, children: o, styles: s } = e;
598
671
  let a = {};
599
- return l && (a = { backgroundImage: `url(${l})` }), u.createElement("div", { ...t, ...r, style: a }, o);
672
+ return l && (a = { backgroundImage: `url(${l})` }), p.createElement("div", { ...t, ...s, style: a }, o);
600
673
  };
601
- d(Ne, {
674
+ d(Fe, {
602
675
  type: "Body",
603
676
  label: "Body",
604
677
  category: "core",
@@ -606,56 +679,56 @@ d(Ne, {
606
679
  hidden: !0,
607
680
  props: {
608
681
  styles: i({ default: "font-body antialiased" }),
609
- backgroundImage: P({ title: "Background Image" })
682
+ backgroundImage: C({ title: "Background Image" })
610
683
  },
611
684
  canAcceptBlock: () => !0,
612
685
  canDelete: () => !1,
613
686
  canMove: () => !1,
614
687
  canDuplicate: () => !1
615
688
  });
616
- const Ae = (e) => {
689
+ const De = (e) => {
617
690
  const { blockProps: t, styles: l } = e;
618
- return u.createElement("br", { ...t, ...l });
691
+ return p.createElement("br", { ...t, ...l });
619
692
  };
620
- d(Ae, {
693
+ d(De, {
621
694
  type: "LineBreak",
622
695
  label: "Line Break",
623
696
  category: "core",
624
697
  group: "basic",
625
698
  hidden: !0,
626
- icon: D,
699
+ icon: F,
627
700
  props: {
628
701
  styles: i({ default: "" })
629
702
  }
630
703
  });
631
- const S = (e) => {
632
- const t = (a, n) => ({
704
+ const j = (e) => {
705
+ const t = (a, r) => ({
633
706
  _id: g(),
634
707
  _parent: a,
635
708
  _type: "TableCell",
636
709
  styles: "#styles:,",
637
- content: `${e === "TableHead" ? "Table Head" : "Table Cell " + n}`
710
+ content: `${e === "TableHead" ? "Table Head" : "Table Cell " + r}`
638
711
  }), l = (a) => {
639
- const n = g(), c = {
712
+ const r = g(), c = {
640
713
  _type: "TableRow",
641
- _id: n,
714
+ _id: r,
642
715
  styles: "#styles:,border-b"
643
716
  };
644
- return a && (c._parent = a), [c, t(n, "1"), t(n, "2"), t(n, "3")];
717
+ return a && (c._parent = a), [c, t(r, "1"), t(r, "2"), t(r, "3")];
645
718
  }, o = (a) => {
646
- const n = g(), c = {
647
- _id: n,
719
+ const r = g(), c = {
720
+ _id: r,
648
721
  _type: "TableHead",
649
722
  styles: "#styles:,font-medium"
650
723
  };
651
- return a && (c._parent = a), [c, ...l(n)];
652
- }, r = (a) => {
653
- const n = g(), c = {
654
- _id: n,
724
+ return a && (c._parent = a), [c, ...l(r)];
725
+ }, s = (a) => {
726
+ const r = g(), c = {
727
+ _id: r,
655
728
  _type: "TableBody",
656
729
  styles: "#styles:,"
657
730
  };
658
- return a && (c._parent = a), [c, ...l(n), ...l(n)];
731
+ return a && (c._parent = a), [c, ...l(r), ...l(r)];
659
732
  };
660
733
  if (e === "Table") {
661
734
  const a = g();
@@ -666,188 +739,188 @@ const S = (e) => {
666
739
  styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
667
740
  },
668
741
  ...o(a),
669
- ...r(a)
742
+ ...s(a)
670
743
  ];
671
744
  }
672
- return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? r() : [];
673
- }, He = (e) => {
745
+ return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? s() : [];
746
+ }, $e = (e) => {
674
747
  const { blockProps: t, children: l, styles: o } = e;
675
- return l ? u.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE HEAD / BODY" });
748
+ return l ? p.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE HEAD / BODY" });
676
749
  };
677
- d(He, {
750
+ d($e, {
678
751
  type: "Table",
679
752
  label: "Table",
680
753
  category: "core",
681
754
  group: "table",
682
755
  hidden: !0,
683
- icon: re,
756
+ icon: ae,
684
757
  props: {
685
758
  styles: i({ default: "" })
686
759
  },
687
- blocks: S("Table")
760
+ blocks: j("Table")
688
761
  });
689
- const Re = (e) => {
762
+ const ze = (e) => {
690
763
  const { blockProps: t, children: l, styles: o } = e;
691
- return l ? u.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE ROW" });
764
+ return l ? p.createElement("thead", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
692
765
  };
693
- d(Re, {
766
+ d(ze, {
694
767
  type: "TableHead",
695
768
  label: "Table Head",
696
769
  category: "core",
697
770
  group: "table",
698
771
  hidden: !0,
699
- icon: ae,
772
+ icon: ne,
700
773
  props: {
701
774
  styles: i({ default: "" })
702
775
  },
703
- blocks: S("TableHead")
776
+ blocks: j("TableHead")
704
777
  });
705
- const De = (e) => {
778
+ const qe = (e) => {
706
779
  const { blockProps: t, children: l, styles: o } = e;
707
- return l ? u.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE ROW" });
780
+ return l ? p.createElement("tbody", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE ROW" });
708
781
  };
709
- d(De, {
782
+ d(qe, {
710
783
  type: "TableBody",
711
784
  label: "Table Body",
712
785
  category: "core",
713
786
  group: "table",
714
787
  hidden: !0,
715
- icon: se,
788
+ icon: re,
716
789
  props: {
717
790
  styles: i({ default: "" })
718
791
  },
719
- blocks: S("TableBody")
792
+ blocks: j("TableBody")
720
793
  });
721
- const $e = (e) => {
794
+ const Oe = (e) => {
722
795
  const { blockProps: t, children: l, styles: o } = e;
723
- return l ? u.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ s.jsx(x, { blockProps: t, text: "TABLE CELL" });
796
+ return l ? p.createElement("tr", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE CELL" });
724
797
  };
725
- d($e, {
798
+ d(Oe, {
726
799
  type: "TableRow",
727
800
  label: "Table Row",
728
801
  category: "core",
729
802
  group: "table",
730
803
  hidden: !0,
731
- icon: ne,
804
+ icon: ce,
732
805
  props: {
733
806
  styles: i({ default: "w-full" })
734
807
  },
735
- blocks: S("TableRow")
808
+ blocks: j("TableRow")
736
809
  });
737
- const Fe = (e) => {
738
- const { blockProps: t, children: l, content: o, styles: r } = e;
739
- return !l && k(o) ? /* @__PURE__ */ s.jsx(x, { blockProps: t }) : l ? u.createElement("td", { ...t, ...r }, l) : u.createElement("td", {
810
+ const Ve = (e) => {
811
+ const { blockProps: t, children: l, content: o, styles: s } = e;
812
+ return !l && k(o) ? /* @__PURE__ */ n.jsx(v, { blockProps: t }) : l ? p.createElement("td", { ...t, ...s }, l) : p.createElement("td", {
740
813
  ...t,
741
- ...r,
814
+ ...s,
742
815
  dangerouslySetInnerHTML: { __html: o }
743
816
  });
744
817
  };
745
- d(Fe, {
818
+ d(Ve, {
746
819
  type: "TableCell",
747
820
  label: "Table Cell",
748
821
  category: "core",
749
822
  group: "table",
750
823
  hidden: !0,
751
- icon: ce,
824
+ icon: ie,
752
825
  props: {
753
826
  styles: i({ default: "" }),
754
- content: _({ title: "Content", default: "Table cell item" })
827
+ content: L({ title: "Content", default: "Table cell item" })
755
828
  }
756
829
  });
757
- const ze = (e) => {
758
- const { blockProps: t, errorMessage: l, name: o, _type: r, successMessage: a, action: n, styles: c, children: p } = e;
759
- let m = p;
760
- p || (m = /* @__PURE__ */ s.jsx(x, { blockProps: {}, text: "FORM FIELDS" }));
830
+ const Ue = (e) => {
831
+ const { blockProps: t, errorMessage: l, name: o, _type: s, successMessage: a, action: r, styles: c, children: u } = e;
832
+ let h = u;
833
+ u || (h = /* @__PURE__ */ n.jsx(v, { blockProps: {}, text: "FORM FIELDS" }));
761
834
  const f = {
762
835
  "x-data": "useForm",
763
836
  "x-on:submit.prevent": "post"
764
- }, y = {
837
+ }, m = {
765
838
  "x-html": "formResponse",
766
839
  ":class": "{'text-red-500': formStatus === 'ERROR', 'text-green-500': formStatus === 'SUCCESS'}"
767
840
  };
768
- return /* @__PURE__ */ s.jsxs(
841
+ return /* @__PURE__ */ n.jsxs(
769
842
  "form",
770
843
  {
771
844
  ...f,
772
845
  "data-error": l,
773
846
  "data-success": a,
774
847
  method: "post",
775
- action: n,
848
+ action: r,
776
849
  ...t,
777
850
  ...c,
778
851
  children: [
779
- /* @__PURE__ */ s.jsx("div", { ...y }),
780
- /* @__PURE__ */ s.jsx("input", { name: "formname", type: "hidden", value: o || r }),
781
- m
852
+ /* @__PURE__ */ n.jsx("div", { ...m }),
853
+ /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: o || s }),
854
+ h
782
855
  ]
783
856
  }
784
857
  );
785
858
  };
786
- d(ze, {
859
+ d(Ue, {
787
860
  type: "Form",
788
861
  label: "Form",
789
862
  category: "core",
790
- icon: ie,
863
+ icon: de,
791
864
  group: "form",
792
865
  hidden: !0,
793
866
  props: {
794
867
  styles: i({ default: "" }),
795
- action: h({
868
+ action: y({
796
869
  title: "Submit URL",
797
870
  default: "/api/form/submit"
798
871
  }),
799
- errorMessage: _({
872
+ errorMessage: L({
800
873
  title: "Error Message",
801
874
  default: "Something went wrong. Please try again"
802
875
  }),
803
- successMessage: _({
876
+ successMessage: L({
804
877
  title: "Success Message",
805
878
  default: "Thank you for your submission."
806
879
  })
807
880
  },
808
881
  canAcceptBlock: () => !0
809
882
  });
810
- const qe = (e) => {
811
- const { blockProps: t, content: l, styles: o, children: r } = e, a = { ...o, ...t };
812
- return r ? u.createElement("label", a, r) : u.createElement("label", {
883
+ const Ge = (e) => {
884
+ const { blockProps: t, content: l, styles: o, children: s } = e, a = { ...o, ...t };
885
+ return s ? p.createElement("label", a, s) : p.createElement("label", {
813
886
  ...a,
814
887
  dangerouslySetInnerHTML: { __html: l }
815
888
  });
816
889
  };
817
- d(qe, {
890
+ d(Ge, {
818
891
  type: "Label",
819
892
  label: "Label",
820
893
  category: "core",
821
- icon: de,
894
+ icon: ue,
822
895
  group: "form",
823
896
  hidden: !0,
824
897
  props: {
825
898
  styles: i({ default: "" }),
826
- content: h({ title: "Content", default: "Label" })
899
+ content: y({ title: "Content", default: "Label" })
827
900
  }
828
901
  });
829
- const Oe = (e) => {
830
- const { blockProps: t, inBuilder: l, label: o, placeholder: r, styles: a, inputStyles: n, icon: c, iconPos: p } = e, m = g(), f = {
902
+ const We = (e) => {
903
+ const { blockProps: t, inBuilder: l, label: o, placeholder: s, styles: a, inputStyles: r, icon: c, iconPos: u } = e, h = g(), f = {
831
904
  "x-bind:disabled": "formLoading"
832
905
  };
833
- return /* @__PURE__ */ s.jsxs(
906
+ return /* @__PURE__ */ n.jsxs(
834
907
  "button",
835
908
  {
836
- id: m,
909
+ id: h,
837
910
  ...f,
838
- ...n,
911
+ ...r,
839
912
  ...a,
840
913
  ...t || {},
841
914
  type: l ? "button" : "submit",
842
- placeholder: r,
915
+ placeholder: s,
843
916
  children: [
844
917
  o,
845
- c && /* @__PURE__ */ s.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: c } })
918
+ c && /* @__PURE__ */ n.jsx("span", { className: u, dangerouslySetInnerHTML: { __html: c } })
846
919
  ]
847
920
  }
848
921
  );
849
922
  };
850
- d(Oe, {
923
+ d(We, {
851
924
  type: "FormButton",
852
925
  label: "Submit Button",
853
926
  category: "core",
@@ -855,12 +928,12 @@ d(Oe, {
855
928
  group: "form",
856
929
  hidden: !0,
857
930
  props: {
858
- label: h({ title: "Label", default: "Submit" }),
931
+ label: y({ title: "Label", default: "Submit" }),
859
932
  styles: i({
860
933
  default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
861
934
  }),
862
- icon: C({ title: "Icon", default: "" }),
863
- iconPos: w({
935
+ icon: P({ title: "Icon", default: "" }),
936
+ iconPos: I({
864
937
  title: "Icon Position",
865
938
  default: "order-last",
866
939
  options: [
@@ -870,102 +943,102 @@ d(Oe, {
870
943
  })
871
944
  }
872
945
  });
873
- const Ve = (e) => {
874
- const { blockProps: t, fieldName: l, label: o, styles: r, inputStyles: a, required: n, checked: c, showLabel: p = !0 } = e, m = g();
875
- return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
876
- /* @__PURE__ */ s.jsx(
946
+ const Ye = (e) => {
947
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, required: r, checked: c, showLabel: u = !0 } = e, h = g();
948
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
949
+ /* @__PURE__ */ n.jsx(
877
950
  "input",
878
951
  {
879
952
  ...a,
880
953
  name: l,
881
- id: m,
954
+ id: h,
882
955
  type: "checkbox",
883
- required: n,
956
+ required: r,
884
957
  defaultChecked: c
885
958
  }
886
959
  ),
887
- o && o !== "Label" && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
888
- ] }) : /* @__PURE__ */ s.jsx(
960
+ o && o !== "Label" && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
961
+ ] }) : /* @__PURE__ */ n.jsx(
889
962
  "input",
890
963
  {
891
- id: m,
964
+ id: h,
892
965
  ...t,
893
966
  ...a,
894
- ...r,
967
+ ...s,
895
968
  type: "checkbox",
896
- required: n,
969
+ required: r,
897
970
  name: l
898
971
  }
899
972
  );
900
973
  };
901
- d(Ve, {
974
+ d(Ye, {
902
975
  type: "Checkbox",
903
976
  label: "Checkbox",
904
977
  category: "core",
905
- icon: ue,
978
+ icon: pe,
906
979
  group: "form",
907
980
  hidden: !0,
908
981
  props: {
909
- fieldName: h({ title: "Field Name", default: "checkbox" }),
982
+ fieldName: y({ title: "Field Name", default: "checkbox" }),
910
983
  styles: i({ default: "flex items-center gap-x-2" }),
911
- label: h({ title: "Label", default: "Label" }),
984
+ label: y({ title: "Label", default: "Label" }),
912
985
  checked: b({ title: "Checked", default: !1 }),
913
986
  required: b({ title: "Required", default: !1 })
914
987
  }
915
988
  });
916
- const Ue = (e) => {
989
+ const Xe = (e) => {
917
990
  const {
918
991
  blockProps: t,
919
992
  label: l,
920
993
  placeholder: o,
921
- styles: r,
994
+ styles: s,
922
995
  inputStyles: a,
923
- showLabel: n,
996
+ showLabel: r,
924
997
  required: c,
925
- inputType: p = "text",
926
- inBuilder: m,
998
+ inputType: u = "text",
999
+ inBuilder: h,
927
1000
  fieldName: f
928
- } = e, y = g();
929
- return !n || p === "submit" ? (p === "submit" && (t.value = l), /* @__PURE__ */ s.jsx(
1001
+ } = e, m = g();
1002
+ return !r || u === "submit" ? (u === "submit" && (t.value = l), /* @__PURE__ */ n.jsx(
930
1003
  "input",
931
1004
  {
932
- id: y,
1005
+ id: m,
933
1006
  name: f,
934
- readOnly: m,
1007
+ readOnly: h,
935
1008
  ...t,
936
1009
  ...a,
937
- ...r,
938
- type: p,
1010
+ ...s,
1011
+ type: u,
939
1012
  placeholder: o,
940
1013
  required: c
941
1014
  }
942
- )) : /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
943
- n && /* @__PURE__ */ s.jsx("label", { htmlFor: y, children: l }),
944
- /* @__PURE__ */ s.jsx(
1015
+ )) : /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1016
+ r && /* @__PURE__ */ n.jsx("label", { htmlFor: m, children: l }),
1017
+ /* @__PURE__ */ n.jsx(
945
1018
  "input",
946
1019
  {
947
1020
  name: f,
948
- readOnly: m,
1021
+ readOnly: h,
949
1022
  ...a,
950
- id: y,
951
- type: p,
1023
+ id: m,
1024
+ type: u,
952
1025
  placeholder: o,
953
1026
  required: c
954
1027
  }
955
1028
  )
956
1029
  ] });
957
1030
  };
958
- d(Ue, {
1031
+ d(Xe, {
959
1032
  type: "Input",
960
1033
  label: "Input",
961
1034
  category: "core",
962
- icon: $,
1035
+ icon: D,
963
1036
  group: "form",
964
1037
  hidden: !0,
965
1038
  props: {
966
1039
  styles: i({ default: "" }),
967
- fieldName: h({ title: "Field Name", default: "input" }),
968
- inputType: w({
1040
+ fieldName: y({ title: "Field Name", default: "input" }),
1041
+ inputType: I({
969
1042
  title: "Type",
970
1043
  options: E(
971
1044
  ["text", "email", "password", "number", "tel", "file", "hidden", "range", "submit", "color", "date", "time"],
@@ -976,180 +1049,180 @@ d(Ue, {
976
1049
  ),
977
1050
  default: "text"
978
1051
  }),
979
- value: h({ title: "Value", default: "" }),
1052
+ value: y({ title: "Value", default: "" }),
980
1053
  showLabel: b({ title: "Show label", default: !0 }),
981
1054
  inputStyles: i({ default: "w-full p-1" }),
982
- label: h({ title: "Label", default: "Label" }),
983
- placeholder: h({
1055
+ label: y({ title: "Label", default: "Label" }),
1056
+ placeholder: y({
984
1057
  title: "Placeholder",
985
1058
  default: "Placeholder"
986
1059
  }),
987
1060
  required: b({ title: "Required", default: !1 })
988
1061
  }
989
1062
  });
990
- const Ye = (e) => {
991
- const { blockProps: t, fieldName: l, label: o, styles: r, inputStyles: a, checked: n, required: c, showLabel: p = !0 } = e, m = g();
992
- return p ? /* @__PURE__ */ s.jsxs("div", { ...r, ...t, children: [
993
- /* @__PURE__ */ s.jsx("input", { ...a, name: l, id: m, type: "radio", required: c, defaultChecked: n }),
994
- o && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o })
995
- ] }) : /* @__PURE__ */ s.jsx(
1063
+ const Ze = (e) => {
1064
+ const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, checked: r, required: c, showLabel: u = !0 } = e, h = g();
1065
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1066
+ /* @__PURE__ */ n.jsx("input", { ...a, name: l, id: h, type: "radio", required: c, defaultChecked: r }),
1067
+ o && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
1068
+ ] }) : /* @__PURE__ */ n.jsx(
996
1069
  "input",
997
1070
  {
998
- id: m,
1071
+ id: h,
999
1072
  ...t,
1000
1073
  ...a,
1001
- ...r,
1074
+ ...s,
1002
1075
  type: "radio",
1003
1076
  required: c,
1004
- checked: n,
1077
+ checked: r,
1005
1078
  name: l
1006
1079
  }
1007
1080
  );
1008
1081
  };
1009
- d(Ye, {
1082
+ d(Ze, {
1010
1083
  type: "Radio",
1011
1084
  label: "Radio",
1012
1085
  category: "core",
1013
- icon: pe,
1086
+ icon: he,
1014
1087
  group: "form",
1015
1088
  hidden: !0,
1016
1089
  props: {
1017
1090
  styles: i({ default: "flex items-center w-max gap-x-2" }),
1018
- fieldName: h({ title: "Field Name", default: "radio" }),
1019
- label: h({ title: "Label", default: "Label" }),
1091
+ fieldName: y({ title: "Field Name", default: "radio" }),
1092
+ label: y({ title: "Label", default: "Label" }),
1020
1093
  checked: b({ title: "Checked", default: !1 }),
1021
1094
  required: b({ title: "Required", default: !1 })
1022
1095
  }
1023
1096
  });
1024
- const Ge = (e) => {
1097
+ const Je = (e) => {
1025
1098
  const {
1026
1099
  blockProps: t,
1027
1100
  fieldName: l,
1028
1101
  label: o,
1029
- placeholder: r,
1102
+ placeholder: s,
1030
1103
  styles: a,
1031
- inputStyles: n,
1104
+ inputStyles: r,
1032
1105
  required: c,
1033
- showLabel: p,
1034
- _multiple: m = !1
1106
+ showLabel: u,
1107
+ _multiple: h = !1
1035
1108
  } = e, f = g();
1036
- return p ? /* @__PURE__ */ s.jsxs("div", { ...a, children: [
1037
- p && /* @__PURE__ */ s.jsx("label", { htmlFor: f, children: o }),
1038
- /* @__PURE__ */ s.jsxs(
1109
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, children: [
1110
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: f, children: o }),
1111
+ /* @__PURE__ */ n.jsxs(
1039
1112
  "select",
1040
1113
  {
1041
- ...n,
1114
+ ...r,
1042
1115
  id: f,
1043
- placeholder: r,
1116
+ placeholder: s,
1044
1117
  required: c,
1045
- multiple: m,
1118
+ multiple: h,
1046
1119
  name: l,
1047
1120
  children: [
1048
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1049
- E(e.options, (y) => /* @__PURE__ */ s.jsx(
1121
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1122
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
1050
1123
  "option",
1051
1124
  {
1052
- selected: v(y, "selected", !1),
1053
- value: y.value,
1054
- dangerouslySetInnerHTML: { __html: y.label }
1125
+ selected: x(m, "selected", !1),
1126
+ value: m.value,
1127
+ dangerouslySetInnerHTML: { __html: m.label }
1055
1128
  },
1056
- y.value
1129
+ m.value
1057
1130
  ))
1058
1131
  ]
1059
1132
  }
1060
1133
  )
1061
- ] }) : /* @__PURE__ */ s.jsxs(
1134
+ ] }) : /* @__PURE__ */ n.jsxs(
1062
1135
  "select",
1063
1136
  {
1064
1137
  id: f,
1065
1138
  ...a,
1066
1139
  ...t,
1067
- placeholder: r,
1140
+ placeholder: s,
1068
1141
  required: c,
1069
- multiple: m,
1142
+ multiple: h,
1070
1143
  name: l,
1071
1144
  children: [
1072
- /* @__PURE__ */ s.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: r }),
1073
- E(e.options, (y) => /* @__PURE__ */ s.jsx(
1145
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1146
+ E(e.options, (m) => /* @__PURE__ */ n.jsx(
1074
1147
  "option",
1075
1148
  {
1076
- selected: v(y, "selected", !1),
1077
- value: y.value,
1078
- dangerouslySetInnerHTML: { __html: y.label }
1149
+ selected: x(m, "selected", !1),
1150
+ value: m.value,
1151
+ dangerouslySetInnerHTML: { __html: m.label }
1079
1152
  },
1080
- y.value
1153
+ m.value
1081
1154
  ))
1082
1155
  ]
1083
1156
  }
1084
1157
  );
1085
1158
  };
1086
- d(Ge, {
1159
+ d(Je, {
1087
1160
  type: "Select",
1088
1161
  label: "Select",
1089
1162
  category: "core",
1090
- icon: me,
1163
+ icon: ye,
1091
1164
  group: "form",
1092
1165
  hidden: !0,
1093
1166
  props: {
1094
1167
  styles: i({ default: "" }),
1095
- fieldName: h({ title: "Field Name", default: "select" }),
1168
+ fieldName: y({ title: "Field Name", default: "select" }),
1096
1169
  showLabel: b({ title: "Show label", default: !0 }),
1097
1170
  inputStyles: i({ default: "w-full p-1" }),
1098
- label: h({ title: "Label", default: "Label" }),
1099
- placeholder: h({
1171
+ label: y({ title: "Label", default: "Label" }),
1172
+ placeholder: y({
1100
1173
  title: "Placeholder",
1101
1174
  default: "Placeholder"
1102
1175
  }),
1103
1176
  required: b({ title: "Required", default: !1 }),
1104
1177
  _multiple: b({ title: "Multiple Choice", default: !1 }),
1105
- options: Y({
1178
+ options: W({
1106
1179
  title: "Options",
1107
1180
  itemProperties: {
1108
- label: h({ title: "Label", default: "" }),
1109
- value: h({ title: "Value", default: "" })
1181
+ label: y({ title: "Label", default: "" }),
1182
+ value: y({ title: "Value", default: "" })
1110
1183
  }
1111
1184
  })
1112
1185
  }
1113
1186
  });
1114
- const We = (e) => {
1115
- const { blockProps: t, fieldName: l, label: o, placeholder: r, styles: a, inputStyles: n, _rows: c, showLabel: p } = e, m = g();
1116
- return p ? /* @__PURE__ */ s.jsxs("div", { ...a, ...t, children: [
1117
- p && /* @__PURE__ */ s.jsx("label", { htmlFor: m, children: o }),
1118
- /* @__PURE__ */ s.jsx("textarea", { name: l, ...n, id: m, placeholder: r, rows: c })
1119
- ] }) : /* @__PURE__ */ s.jsx(
1187
+ const Ke = (e) => {
1188
+ const { blockProps: t, fieldName: l, label: o, placeholder: s, styles: a, inputStyles: r, _rows: c, showLabel: u } = e, h = g();
1189
+ return u ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1190
+ u && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o }),
1191
+ /* @__PURE__ */ n.jsx("textarea", { name: l, ...r, id: h, placeholder: s, rows: c })
1192
+ ] }) : /* @__PURE__ */ n.jsx(
1120
1193
  "textarea",
1121
1194
  {
1122
- id: m,
1195
+ id: h,
1123
1196
  name: l,
1124
1197
  ...t,
1125
- ...n,
1198
+ ...r,
1126
1199
  ...a,
1127
- placeholder: r,
1200
+ placeholder: s,
1128
1201
  rows: c
1129
1202
  }
1130
1203
  );
1131
1204
  };
1132
- d(We, {
1205
+ d(Ke, {
1133
1206
  type: "TextArea",
1134
1207
  label: "TextArea",
1135
1208
  category: "core",
1136
- icon: $,
1209
+ icon: D,
1137
1210
  group: "form",
1138
1211
  hidden: !0,
1139
1212
  props: {
1140
- fieldName: h({ title: "Field Name", default: "textarea" }),
1213
+ fieldName: y({ title: "Field Name", default: "textarea" }),
1141
1214
  showLabel: b({ title: "Show label", default: !0 }),
1142
1215
  styles: i({ default: "" }),
1143
1216
  inputStyles: i({ default: "w-full p-1" }),
1144
- label: h({ title: "Label", default: "Label" }),
1145
- placeholder: h({
1217
+ label: y({ title: "Label", default: "Label" }),
1218
+ placeholder: y({
1146
1219
  title: "Placeholder",
1147
1220
  default: "Placeholder"
1148
1221
  }),
1149
- _rows: T({ title: "Rows", default: 3 })
1222
+ _rows: _({ title: "Rows", default: 3 })
1150
1223
  }
1151
1224
  });
1152
- const st = O;
1225
+ const pt = V;
1153
1226
  export {
1154
- st as loadWebBlocks
1227
+ pt as loadWebBlocks
1155
1228
  };