@chaibuilder/sdk 1.2.32 → 1.2.34

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 (103) hide show
  1. package/dist/{AddBlocks-0eVRNr1d.js → AddBlocks-RmEkZXdE.js} +37 -33
  2. package/dist/AddBlocks-XYCWUol8.cjs +1 -0
  3. package/dist/{BrandingOptions-yYAznnw2.js → BrandingOptions-TnzCIC7A.js} +37 -31
  4. package/dist/BrandingOptions-qnaKl27s.cjs +1 -0
  5. package/dist/CanvasArea-SeSRWHy0.js +1200 -0
  6. package/dist/CanvasArea-iIwERFUC.cjs +55 -0
  7. package/dist/ChaiBuilderEditor-YqEKonJ_.cjs +206 -0
  8. package/dist/{index-AJalHhkO.js → ChaiBuilderEditor-y1NxvXJ7.js} +24114 -20836
  9. package/dist/{CurrentPage-1v40uk8K.js → CurrentPage-9KDre_9q.js} +19 -19
  10. package/dist/CurrentPage-TNff16tH.cjs +1 -0
  11. package/dist/ListTree-GxCAsv2Y.cjs +1 -0
  12. package/dist/{ListTree-0ZrRreCs.js → ListTree-H2WaKwOs.js} +81 -76
  13. package/dist/PagesPanel-5DRsqV-G.cjs +1 -0
  14. package/dist/{PagesPanel-AxQX-BX2.js → PagesPanel-jHMmJEtv.js} +14 -14
  15. package/dist/ProjectPanel-CDnnGpVo.cjs +1 -0
  16. package/dist/{ProjectPanel-GYdge5v9.js → ProjectPanel-uxhq_D3j.js} +16 -16
  17. package/dist/Settings-nGnVavh4.cjs +1 -0
  18. package/dist/{Settings-9JAzGHau.js → Settings-yqZksAbO.js} +53 -53
  19. package/dist/{SidePanels-bLwsW29O.js → SidePanels-1gwirESt.js} +70 -70
  20. package/dist/SidePanels-33KNaSS3.cjs +1 -0
  21. package/dist/{Topbar-0Ql8pHVc.js → Topbar-NHF8D1di.js} +19 -14
  22. package/dist/Topbar-Wwdd9Flx.cjs +1 -0
  23. package/dist/{UnsplashImages-NYwOOgYa.js → UnsplashImages-LLu2wFeN.js} +26 -21
  24. package/dist/UnsplashImages-lnz6NfSD.cjs +1 -0
  25. package/dist/UploadImages-3nl_4mDf.cjs +1 -0
  26. package/dist/{UploadImages-vpZeW-YW.js → UploadImages-FtvaDyk9.js} +33 -27
  27. package/dist/{add-page-modal-hDyzsEU7.js → add-page-modal-V9DTBMmY.js} +22 -22
  28. package/dist/add-page-modal-sIZk552b.cjs +1 -0
  29. package/dist/confirm-alert-Uzq5XNGt.cjs +1 -0
  30. package/dist/{confirm-alert-FGQKKQJU.js → confirm-alert-sI4pItIN.js} +16 -10
  31. package/dist/{controls-OfJWSEqC.js → controls-VTdJhdSz.js} +44 -41
  32. package/dist/controls-jWJDao88.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.d.ts +9 -0
  35. package/dist/core.js +46 -45
  36. package/dist/delete-page-modal-UminFzYh.cjs +1 -0
  37. package/dist/{delete-page-modal-KxeyBri2.js → delete-page-modal-XrIpujav.js} +15 -15
  38. package/dist/email-blocks.cjs +1 -1
  39. package/dist/email-blocks.js +1 -1
  40. package/dist/email.cjs +1 -1
  41. package/dist/email.d.ts +9 -0
  42. package/dist/email.js +18 -16
  43. package/dist/{form-77dY98bF.js → form-dQQ2tTRZ.js} +7 -7
  44. package/dist/form-q7lxaK3j.cjs +1 -0
  45. package/dist/functions-ge87TVcc.js +30 -0
  46. package/dist/functions-sBiIevFh.cjs +1 -0
  47. package/dist/{index-5zkCTSAM.js → index-OsS2_gM8.js} +28 -29
  48. package/dist/index-eYwpNzUl.cjs +1 -0
  49. package/dist/lib.cjs +2 -2
  50. package/dist/lib.d.ts +2 -0
  51. package/dist/lib.js +12 -10
  52. package/dist/{page-viewer-umQaut1j.js → page-viewer-AoJ5HU6j.js} +21 -21
  53. package/dist/page-viewer-FzhqSyNO.cjs +1 -0
  54. package/dist/project-general-setting-WzJ8U1OW.cjs +1 -0
  55. package/dist/{project-general-setting-uuCemMCU.js → project-general-setting-g3YJYszB.js} +24 -24
  56. package/dist/{project-seo-setting-asvbPQiI.js → project-seo-setting-1sLmV-wv.js} +26 -20
  57. package/dist/project-seo-setting-GuObNafp.cjs +1 -0
  58. package/dist/render.cjs +1 -1
  59. package/dist/render.d.ts +2 -0
  60. package/dist/render.js +55 -53
  61. package/dist/single-page-detail-WGars7Tl.cjs +1 -0
  62. package/dist/{single-page-detail-F6pKWyq1.js → single-page-detail-sQ3BH6Rc.js} +25 -25
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.d.ts +9 -0
  65. package/dist/studio.js +13 -13
  66. package/dist/ui.cjs +1 -1
  67. package/dist/ui.js +153 -147
  68. package/dist/useCanvasSettings-QcsmJd9b.cjs +1 -0
  69. package/dist/{useCanvasSettings-ikt217kv.js → useCanvasSettings-XwFRrknO.js} +1 -1
  70. package/dist/web-blocks.cjs +4 -4
  71. package/dist/web-blocks.js +137 -113
  72. package/package.json +9 -3
  73. package/dist/AddBlocks-t0hKDSud.cjs +0 -1
  74. package/dist/BrandingOptions-NVmCxZfD.cjs +0 -1
  75. package/dist/CanvasArea-2b4oSjRx.js +0 -1177
  76. package/dist/CanvasArea-OzyCq6UU.cjs +0 -55
  77. package/dist/CurrentPage-YBMhEBZG.cjs +0 -1
  78. package/dist/ListTree-jPwxgI6R.cjs +0 -1
  79. package/dist/PagesPanel-ivEL9tIQ.cjs +0 -1
  80. package/dist/ProjectPanel-shgvg_yT.cjs +0 -1
  81. package/dist/Settings-MMwEBADN.cjs +0 -1
  82. package/dist/SidePanels-iaaRCUeQ.cjs +0 -1
  83. package/dist/Topbar-CkUhCnSW.cjs +0 -1
  84. package/dist/UnsplashImages-juwtWvXe.cjs +0 -1
  85. package/dist/UploadImages-4_jmnoVi.cjs +0 -1
  86. package/dist/add-page-modal-2ZPjc54F.cjs +0 -1
  87. package/dist/confirm-alert-QRxOc76t.cjs +0 -1
  88. package/dist/controls-KK2oLIa8.cjs +0 -1
  89. package/dist/delete-page-modal--N1nPPIL.cjs +0 -1
  90. package/dist/form-hT5dGoJH.cjs +0 -1
  91. package/dist/functions-I6BoMqqb.js +0 -21
  92. package/dist/functions-r3ExvGGf.cjs +0 -1
  93. package/dist/index-FPBudsRF.cjs +0 -1
  94. package/dist/index-JIcsKKoG.cjs +0 -1
  95. package/dist/index-YpnaudSM.js +0 -63
  96. package/dist/index-ecnGWzh9.cjs +0 -1
  97. package/dist/index-hH5SIZ29.js +0 -3116
  98. package/dist/index-sJ9Uc9UY.cjs +0 -206
  99. package/dist/page-viewer-k-g15j8B.cjs +0 -1
  100. package/dist/project-general-setting-1leAiCJQ.cjs +0 -1
  101. package/dist/project-seo-setting-kDBSOzgX.cjs +0 -1
  102. package/dist/single-page-detail-IFtVxwl5.cjs +0 -1
  103. package/dist/useCanvasSettings-Am2o80hW.cjs +0 -1
@@ -1,10 +1,10 @@
1
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
2
  import { j as n } from "./jsx-runtime-WbnYoNE9.js";
3
3
  import * as u from "react";
4
- import { S as c, s as w, o as C, g as I, 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";
4
+ import { S as c, y as w, q as C, g as I, m as L, l as y, o as P, c as _, T as U, b as G, r as b, h as W } from "./controls-VTdJhdSz.js";
5
5
  import { registerChaiBlock as d } from "@chaibuilder/runtime";
6
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";
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 ae, SpaceBetweenVerticallyIcon as F, TableIcon as se, 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
8
  import { c as S, g } from "./Functions-7jnEwJyw.js";
9
9
  import { g as A } from "./html-to-json-ZV4QjSww.js";
10
10
  import "./_commonjsHelpers-UyOWmZb0.js";
@@ -14,11 +14,11 @@ import "himalaya";
14
14
  import "./STRINGS--j49GZJP.js";
15
15
  const me = u.memo(
16
16
  (e) => {
17
- const { blockProps: t, inBuilder: l, backgroundImage: o, children: s, tag: a = "div", styles: r } = e;
18
- let i = s;
19
- s || (i = /* @__PURE__ */ n.jsx(v, { blockProps: {}, styles: {}, inBuilder: l }));
17
+ const { blockProps: t, inBuilder: l, backgroundImage: o, children: a, tag: s = "div", styles: r } = e;
18
+ let i = a;
19
+ a || (i = /* @__PURE__ */ n.jsx(v, { blockProps: {}, styles: {}, inBuilder: l }));
20
20
  let p = {};
21
- return o && (p = { backgroundImage: `url(${o})` }), u.createElement(a, { ...t, ...r, style: p }, i);
21
+ return o && (p = { backgroundImage: `url(${o})` }), u.createElement(s, { ...t, ...r, style: p }, i);
22
22
  }
23
23
  );
24
24
  d(me, {
@@ -72,10 +72,12 @@ d(fe, {
72
72
  canAcceptBlock: () => !1
73
73
  });
74
74
  const be = (e) => {
75
- const { blockProps: t, styles: l, content: o, level: s = "h1", children: a = null } = e;
76
- return a ? u.createElement(s, { ...l, ...t }, a) : u.createElement(s, {
75
+ const { blockProps: t, styles: l, content: o, level: a = "h1", children: s = null } = e;
76
+ return s ? u.createElement(a, { ...l, ...t }, s) : u.createElement(a, {
77
77
  ...l,
78
78
  ...t,
79
+ "data-ai-key": "content",
80
+ "data-ai-type": "html",
79
81
  dangerouslySetInnerHTML: { __html: o }
80
82
  });
81
83
  };
@@ -109,6 +111,8 @@ const ge = (e) => {
109
111
  return $(e.children) ? u.createElement("p", {
110
112
  ...l,
111
113
  ...t,
114
+ "data-ai-key": "content",
115
+ "data-ai-type": "html",
112
116
  dangerouslySetInnerHTML: { __html: o }
113
117
  }) : u.createElement("p", { ...l, ...t }, e.children);
114
118
  };
@@ -128,10 +132,11 @@ d(ge, {
128
132
  canAcceptBlock: (e) => e === "Span" || e === "Link"
129
133
  });
130
134
  const ve = (e) => {
131
- const { blockProps: t, styles: l, content: o, children: s = null, tag: a } = e;
132
- return s ? u.createElement("span", { ...l, ...t }, s) : u.createElement(a || "span", {
135
+ const { blockProps: t, styles: l, content: o, children: a = null, tag: s } = e;
136
+ return a ? u.createElement("span", { ...l, ...t }, a) : u.createElement(s || "span", {
133
137
  ...l,
134
138
  ...t,
139
+ "data-ai-key": "content",
135
140
  dangerouslySetInnerHTML: { __html: o }
136
141
  });
137
142
  };
@@ -148,7 +153,16 @@ d(ve, {
148
153
  });
149
154
  const xe = (e) => {
150
155
  const { blockProps: t, content: l, styles: o } = e;
151
- return /* @__PURE__ */ n.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ n.jsx("div", { ...t, ...o, dangerouslySetInnerHTML: { __html: l } }) });
156
+ return /* @__PURE__ */ n.jsx("div", { className: "max-w-full", children: /* @__PURE__ */ n.jsx(
157
+ "div",
158
+ {
159
+ "data-ai-key": "content",
160
+ "data-ai-type": "richtext",
161
+ ...t,
162
+ ...o,
163
+ dangerouslySetInnerHTML: { __html: l }
164
+ }
165
+ ) });
152
166
  };
153
167
  d(xe, {
154
168
  type: "RichText",
@@ -165,18 +179,26 @@ d(xe, {
165
179
  }
166
180
  });
167
181
  const ke = (e) => {
168
- const { blockProps: t, iconSize: l, icon: o, content: s, iconPos: a, styles: r, children: i } = e, p = o, h = i || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
169
- /* @__PURE__ */ n.jsx("span", { children: s }),
182
+ const { blockProps: t, iconSize: l, icon: o, content: a, iconPos: s, styles: r, children: i } = e, p = o, h = i || /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
183
+ /* @__PURE__ */ n.jsx("span", { "data-ai-key": "content", children: a }),
170
184
  p && /* @__PURE__ */ n.jsx(
171
185
  "div",
172
186
  {
173
187
  style: { width: l + "px" },
174
- className: a + " " + (a === "order-first" ? "mr-2" : "ml-2") || "",
188
+ className: s + " " + (s === "order-first" ? "mr-2" : "ml-2") || "",
175
189
  dangerouslySetInnerHTML: { __html: p }
176
190
  }
177
191
  )
178
192
  ] });
179
- return u.createElement("button", { ...t, ...r, type: "button" }, h);
193
+ return u.createElement(
194
+ "button",
195
+ {
196
+ ...t,
197
+ ...r,
198
+ type: "button"
199
+ },
200
+ h
201
+ );
180
202
  };
181
203
  d(ke, {
182
204
  type: "Button",
@@ -185,7 +207,7 @@ d(ke, {
185
207
  icon: R,
186
208
  group: "basic",
187
209
  props: {
188
- content: y({ title: "Label", default: "Button", multiLingual: !0 }),
210
+ content: y({ title: "Label", default: "Button" }),
189
211
  styles: c({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
190
212
  icon: P({ title: "Icon", default: "" }),
191
213
  iconSize: _({ title: "Icon Size", default: 24 }),
@@ -200,15 +222,16 @@ d(ke, {
200
222
  }
201
223
  });
202
224
  const Be = (e) => {
203
- const { blockProps: t, link: l, children: o, styles: s, inBuilder: a, content: r } = e;
204
- 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 }) : u.createElement("span", {
225
+ const { blockProps: t, link: l, children: o, styles: a, inBuilder: s, content: r } = e;
226
+ return !o && k(a == null ? void 0 : a.className) && k(r) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, inBuilder: s }) : s ? o ? /* @__PURE__ */ n.jsx("span", { "data-simulate": "a", ...t, ...a, children: o }) : u.createElement("span", {
205
227
  ...t,
206
- ...s,
228
+ ...a,
207
229
  dangerouslySetInnerHTML: { __html: r },
208
230
  "data-simulate": "a"
209
- }) : o ? /* @__PURE__ */ n.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...s, children: o }) : u.createElement("a", {
231
+ }) : o ? /* @__PURE__ */ n.jsx("a", { href: l.href || "#/", target: l.target, ...t, ...a, children: o }) : u.createElement("a", {
210
232
  ...t,
211
- ...s,
233
+ ...a,
234
+ "data-ai-key": "content",
212
235
  href: l.href || "#",
213
236
  target: l.target || "_self",
214
237
  dangerouslySetInnerHTML: { __html: r }
@@ -231,10 +254,10 @@ d(Be, {
231
254
  canAcceptBlock: () => !0
232
255
  });
233
256
  const we = (e) => {
234
- const { blockProps: t, children: l, listType: o, styles: s, tag: a, inBuilder: r } = e, i = S(x(s, "className", ""), o);
235
- return !l && k(s == null ? void 0 : s.className) ? /* @__PURE__ */ n.jsx(v, { inBuilder: r, blockProps: t, text: "LIST ITEM" }) : u.createElement(
236
- a || (o === "list-decimal" ? "ol" : "ul"),
237
- { ...t, ...s, className: i },
257
+ const { blockProps: t, children: l, listType: o, styles: a, tag: s, inBuilder: r } = e, i = S(x(a, "className", ""), o);
258
+ return !l && k(a == null ? void 0 : a.className) ? /* @__PURE__ */ n.jsx(v, { inBuilder: r, blockProps: t, text: "LIST ITEM" }) : u.createElement(
259
+ s || (o === "list-decimal" ? "ol" : "ul"),
260
+ { ...t, ...a, className: i },
238
261
  l
239
262
  );
240
263
  };
@@ -283,10 +306,11 @@ d(we, {
283
306
  ]
284
307
  });
285
308
  const Ie = (e) => {
286
- const { blockProps: t, content: l, styles: o, children: s, tag: a } = e;
287
- return s ? u.createElement(a || "li", { ...o, ...t }, s) : u.createElement(a || "li", {
309
+ const { blockProps: t, content: l, styles: o, children: a, tag: s } = e;
310
+ return a ? u.createElement(s || "li", { ...o, ...t }, a) : u.createElement(s || "li", {
288
311
  ...o,
289
312
  ...t,
313
+ "data-ai-key": "content",
290
314
  dangerouslySetInnerHTML: { __html: l }
291
315
  });
292
316
  };
@@ -307,9 +331,9 @@ const B = (e, ...t) => ({
307
331
  ...e,
308
332
  className: S(e.className, ...t)
309
333
  }), Te = (e) => {
310
- const { blockProps: t, icon: l, styles: o, width: s, inBuilder: a, height: r } = e, i = B(o, S(s ? `w-[${s}px]` : "", r ? `h-[${r}px]` : ""));
334
+ const { blockProps: t, icon: l, styles: o, width: a, inBuilder: s, height: r } = e, i = B(o, S(a ? `w-[${a}px]` : "", r ? `h-[${r}px]` : ""));
311
335
  if (k(l))
312
- return /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "", inBuilder: a, className: "h-8 w-14" });
336
+ return /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "", inBuilder: s, className: "h-8 w-14" });
313
337
  const p = l.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
314
338
  return u.createElement("span", {
315
339
  ...t,
@@ -334,13 +358,13 @@ d(Te, {
334
358
  }
335
359
  });
336
360
  const Le = (e) => {
337
- const { blockProps: t, image: l, styles: o, alt: s, height: a, width: r } = e;
361
+ const { blockProps: t, image: l, styles: o, alt: a, height: s, width: r } = e;
338
362
  return k(l) ? /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "IMAGE URL", className: "h-36" }) : u.createElement("img", {
339
363
  ...t,
340
364
  ...o,
341
365
  src: l,
342
- alt: s,
343
- height: a,
366
+ alt: a,
367
+ height: s,
344
368
  width: r
345
369
  });
346
370
  };
@@ -363,13 +387,13 @@ d(Le, {
363
387
  });
364
388
  const _e = (e) => {
365
389
  var r;
366
- const { blockProps: t, inBuilder: l, styles: o, children: s } = e;
367
- let a = null;
368
- return !s && l && (a = // @ts-ignore
390
+ const { blockProps: t, inBuilder: l, styles: o, children: a } = e;
391
+ let s = null;
392
+ return !a && l && (s = // @ts-ignore
369
393
  /* @__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: [
370
394
  "Slot: ",
371
395
  e.name
372
- ] }) }) })), u.createElement("div", { ...o, ...t, droppable: "yes" }, s || a);
396
+ ] }) }) })), u.createElement("div", { ...o, ...t, droppable: "yes" }, a || s);
373
397
  };
374
398
  d(_e, {
375
399
  type: "Slot",
@@ -399,14 +423,14 @@ const M = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
399
423
  return null;
400
424
  }, je = u.memo(
401
425
  (e) => {
402
- const { blockProps: t, inBuilder: l, styles: o, url: s, controls: a } = e, r = x(a, "autoPlay", !1), i = x(a, "controls", !1), p = r || x(a, "muted", !0), h = x(a, "loop", !1);
403
- if (k(s))
426
+ const { blockProps: t, inBuilder: l, styles: o, url: a, controls: s } = e, r = x(s, "autoPlay", !1), i = x(s, "controls", !1), p = r || x(s, "muted", !0), h = x(s, "loop", !1);
427
+ if (k(a))
404
428
  return /* @__PURE__ */ n.jsx(v, { inBuilder: l, blockProps: t, text: "VIDEO URL", className: "h-36" });
405
- let f = Se(s), m = null;
429
+ let f = Se(a), m = null;
406
430
  if (f) {
407
431
  if (!k(f)) {
408
432
  const T = [];
409
- T.push(`autoplay=${r ? 1 : 0}`), T.push(`controls=${a ? 1 : 0}`), T.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), T.push(`loop=${h ? 1 : 0}`), f = `${f}?${T.join("&")}`;
433
+ T.push(`autoplay=${r ? 1 : 0}`), T.push(`controls=${s ? 1 : 0}`), T.push(`mute=${p ? 1 : 0}&muted=${p ? 1 : 0}`), T.push(`loop=${h ? 1 : 0}`), f = `${f}?${T.join("&")}`;
410
434
  }
411
435
  m = u.createElement("iframe", {
412
436
  ...t,
@@ -420,7 +444,7 @@ const M = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-
420
444
  m = u.createElement("video", {
421
445
  ...t,
422
446
  className: "absolute inset-0 w-full h-full",
423
- src: s,
447
+ src: a,
424
448
  controls: i,
425
449
  muted: p,
426
450
  autoPlay: l ? !1 : r,
@@ -457,9 +481,9 @@ d(je, {
457
481
  });
458
482
  const Ee = u.memo(
459
483
  (e) => {
460
- const { blockProps: t, styles: l, content: o, inBuilder: s } = e;
484
+ const { blockProps: t, styles: l, content: o, inBuilder: a } = e;
461
485
  return /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
462
- s ? /* @__PURE__ */ n.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
486
+ a ? /* @__PURE__ */ n.jsx("div", { ...t, ...l, className: "absolute z-20 h-full w-full" }) : null,
463
487
  u.createElement("div", {
464
488
  ...l,
465
489
  dangerouslySetInnerHTML: { __html: o }
@@ -490,13 +514,13 @@ d(Ce, {
490
514
  type: "Divider",
491
515
  label: "Divider",
492
516
  category: "core",
493
- icon: se,
517
+ icon: ae,
494
518
  group: "basic",
495
519
  props: {
496
520
  styles: c({ default: "bg-gray-900 h-0.5 py-2 my-1" })
497
521
  }
498
522
  });
499
- const Pe = (e) => e.inBuilder ? /* @__PURE__ */ n.jsx("span", { ...e.blockProps, children: e.content }) : `${e.content}`;
523
+ const Pe = (e) => e.inBuilder || e.forceWrapper ? /* @__PURE__ */ n.jsx("span", { "data-ai-key": "content", ...e.blockProps, children: e.content }) : `${e.content}`;
500
524
  d(Pe, {
501
525
  type: "Text",
502
526
  label: "Text",
@@ -546,11 +570,11 @@ d(Ae, {
546
570
  canAcceptBlock: (e) => e === "Accordion"
547
571
  });
548
572
  const Me = ({ children: e, blockProps: t, styles: l, blockState: o }) => {
549
- const s = B(
573
+ const a = B(
550
574
  l,
551
575
  "hs-accordion " + (o && o != null && o.active ? "active" : "")
552
576
  );
553
- return /* @__PURE__ */ n.jsx("div", { ...t, ...s, children: e });
577
+ return /* @__PURE__ */ n.jsx("div", { ...t, ...a, children: e });
554
578
  };
555
579
  d(Me, {
556
580
  type: "Accordion",
@@ -602,13 +626,13 @@ d(Ne, {
602
626
  canMove: () => !1,
603
627
  canDuplicate: () => !1
604
628
  });
605
- const He = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
606
- const a = B(
629
+ const He = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: a }) => {
630
+ const s = B(
607
631
  l,
608
632
  "hs-accordion-content",
609
- s && o ? o != null && o.active ? "!block !opacity-100" : "!hidden !opacity-0" : ""
633
+ a && o ? o != null && o.active ? "!block !opacity-100" : "!hidden !opacity-0" : ""
610
634
  );
611
- return /* @__PURE__ */ n.jsx("div", { ...a, ...t, children: e });
635
+ return /* @__PURE__ */ n.jsx("div", { ...s, ...t, children: e });
612
636
  };
613
637
  d(He, {
614
638
  type: "AccordionContent",
@@ -626,8 +650,8 @@ d(He, {
626
650
  canMove: () => !1,
627
651
  canDuplicate: () => !1
628
652
  });
629
- const Re = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
630
- const a = s && (o != null && o.active) ? " open" : "", r = B(l, "hs-collapse-toggle", a);
653
+ const Re = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: a }) => {
654
+ const s = a && (o != null && o.active) ? " open" : "", r = B(l, "hs-collapse-toggle", s);
631
655
  return /* @__PURE__ */ n.jsx("button", { type: "button", ...r, ...t, children: e });
632
656
  };
633
657
  d(Re, {
@@ -647,12 +671,12 @@ d(Re, {
647
671
  const l = x(e, "styles_attrs.data-hs-collapse", "").replace("#", "");
648
672
  if (!l)
649
673
  return [];
650
- const o = O(t, (s) => x(s, "styles_attrs.id") === l);
674
+ const o = O(t, (a) => x(a, "styles_attrs.id") === l);
651
675
  return o ? [o == null ? void 0 : o._id] : [];
652
676
  }
653
677
  });
654
- const Fe = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: s }) => {
655
- const a = s ? { "!block !opacity-100 open": o == null ? void 0 : o.active, "": !(o != null && o.active) } : {}, r = Object.keys(a).filter((p) => a[p]).join(" "), i = B(l, "hs-collapse", r);
678
+ const Fe = ({ children: e, blockProps: t, styles: l, blockState: o, inBuilder: a }) => {
679
+ const s = a ? { "!block !opacity-100 open": o == null ? void 0 : o.active, "": !(o != null && o.active) } : {}, r = Object.keys(s).filter((p) => s[p]).join(" "), i = B(l, "hs-collapse", r);
656
680
  return /* @__PURE__ */ n.jsx("div", { ...i, ...t, children: e });
657
681
  };
658
682
  d(Fe, {
@@ -680,9 +704,9 @@ d(Fe, {
680
704
  </div>`.replace(/hs-unstyled-collapse/g, `dnd-collapse-${g()}`))
681
705
  });
682
706
  const De = (e) => {
683
- const { blockProps: t, backgroundImage: l, children: o, styles: s } = e;
684
- let a = {};
685
- return l && (a = { backgroundImage: `url(${l})` }), u.createElement("div", { ...t, ...s, style: a }, o);
707
+ const { blockProps: t, backgroundImage: l, children: o, styles: a } = e;
708
+ let s = {};
709
+ return l && (s = { backgroundImage: `url(${l})` }), u.createElement("div", { ...t, ...a, style: s }, o);
686
710
  };
687
711
  d(De, {
688
712
  type: "Body",
@@ -715,47 +739,47 @@ d($e, {
715
739
  }
716
740
  });
717
741
  const j = (e) => {
718
- const t = (a, r) => ({
742
+ const t = (s, r) => ({
719
743
  _id: g(),
720
- _parent: a,
744
+ _parent: s,
721
745
  _type: "TableCell",
722
746
  styles: "#styles:,",
723
747
  content: `${e === "TableHead" ? "Table Head" : "Table Cell " + r}`
724
- }), l = (a) => {
748
+ }), l = (s) => {
725
749
  const r = g(), i = {
726
750
  _type: "TableRow",
727
751
  _id: r,
728
752
  styles: "#styles:,border-b"
729
753
  };
730
- return a && (i._parent = a), [i, t(r, "1"), t(r, "2"), t(r, "3")];
731
- }, o = (a) => {
754
+ return s && (i._parent = s), [i, t(r, "1"), t(r, "2"), t(r, "3")];
755
+ }, o = (s) => {
732
756
  const r = g(), i = {
733
757
  _id: r,
734
758
  _type: "TableHead",
735
759
  styles: "#styles:,font-medium"
736
760
  };
737
- return a && (i._parent = a), [i, ...l(r)];
738
- }, s = (a) => {
761
+ return s && (i._parent = s), [i, ...l(r)];
762
+ }, a = (s) => {
739
763
  const r = g(), i = {
740
764
  _id: r,
741
765
  _type: "TableBody",
742
766
  styles: "#styles:,"
743
767
  };
744
- return a && (i._parent = a), [i, ...l(r), ...l(r)];
768
+ return s && (i._parent = s), [i, ...l(r), ...l(r)];
745
769
  };
746
770
  if (e === "Table") {
747
- const a = g();
771
+ const s = g();
748
772
  return [
749
773
  {
750
- _id: a,
774
+ _id: s,
751
775
  _type: "Table",
752
776
  styles: "#styles:,w-full text-left text-gray-500 dark:text-gray-400"
753
777
  },
754
- ...o(a),
755
- ...s(a)
778
+ ...o(s),
779
+ ...a(s)
756
780
  ];
757
781
  }
758
- return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? s() : [];
782
+ return e === "TableRow" ? l() : e === "TableHead" ? o() : e === "TableBody" ? a() : [];
759
783
  }, ze = (e) => {
760
784
  const { blockProps: t, children: l, styles: o } = e;
761
785
  return l ? u.createElement("table", { ...t, ...o }, l) : /* @__PURE__ */ n.jsx(v, { blockProps: t, text: "TABLE HEAD / BODY" });
@@ -766,7 +790,7 @@ d(ze, {
766
790
  category: "core",
767
791
  group: "table",
768
792
  hidden: !0,
769
- icon: ae,
793
+ icon: se,
770
794
  props: {
771
795
  styles: c({ default: "" })
772
796
  },
@@ -821,10 +845,10 @@ d(Ve, {
821
845
  blocks: j("TableRow")
822
846
  });
823
847
  const Ue = (e) => {
824
- const { blockProps: t, children: l, content: o, styles: s } = e;
825
- return !l && k(o) ? /* @__PURE__ */ n.jsx(v, { blockProps: t }) : l ? u.createElement("td", { ...t, ...s }, l) : u.createElement("td", {
848
+ const { blockProps: t, children: l, content: o, styles: a } = e;
849
+ return !l && k(o) ? /* @__PURE__ */ n.jsx(v, { blockProps: t }) : l ? u.createElement("td", { ...t, ...a }, l) : u.createElement("td", {
826
850
  ...t,
827
- ...s,
851
+ ...a,
828
852
  dangerouslySetInnerHTML: { __html: o }
829
853
  });
830
854
  };
@@ -837,11 +861,11 @@ d(Ue, {
837
861
  icon: ie,
838
862
  props: {
839
863
  styles: c({ default: "" }),
840
- content: L({ title: "Content", default: "Table cell item" })
864
+ content: L({ title: "Content", default: "Table cell item", ai: { html: !0 } })
841
865
  }
842
866
  });
843
867
  const Ge = (e) => {
844
- const { blockProps: t, errorMessage: l, name: o, _type: s, successMessage: a, action: r, styles: i, children: p } = e;
868
+ const { blockProps: t, errorMessage: l, name: o, _type: a, successMessage: s, action: r, styles: i, children: p } = e;
845
869
  let h = p;
846
870
  p || (h = /* @__PURE__ */ n.jsx(v, { blockProps: {}, text: "FORM FIELDS" }));
847
871
  const f = {
@@ -856,14 +880,14 @@ const Ge = (e) => {
856
880
  {
857
881
  ...f,
858
882
  "data-error": l,
859
- "data-success": a,
883
+ "data-success": s,
860
884
  method: "post",
861
885
  action: r,
862
886
  ...t,
863
887
  ...i,
864
888
  children: [
865
889
  /* @__PURE__ */ n.jsx("div", { ...m }),
866
- /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: o || s }),
890
+ /* @__PURE__ */ n.jsx("input", { name: "formname", type: "hidden", value: o || a }),
867
891
  h
868
892
  ]
869
893
  }
@@ -894,9 +918,9 @@ d(Ge, {
894
918
  canAcceptBlock: () => !0
895
919
  });
896
920
  const We = (e) => {
897
- const { blockProps: t, content: l, styles: o, children: s } = e, a = { ...o, ...t };
898
- return s ? u.createElement("label", a, s) : u.createElement("label", {
899
- ...a,
921
+ const { blockProps: t, content: l, styles: o, children: a } = e, s = { ...o, ...t };
922
+ return a ? u.createElement("label", s, a) : u.createElement("label", {
923
+ ...s,
900
924
  dangerouslySetInnerHTML: { __html: l }
901
925
  });
902
926
  };
@@ -909,11 +933,11 @@ d(We, {
909
933
  hidden: !0,
910
934
  props: {
911
935
  styles: c({ default: "" }),
912
- content: y({ title: "Content", default: "Label" })
936
+ content: y({ title: "Content", default: "Label", ai: { html: !1 } })
913
937
  }
914
938
  });
915
939
  const Ye = (e) => {
916
- const { blockProps: t, inBuilder: l, label: o, placeholder: s, styles: a, inputStyles: r, icon: i, iconPos: p } = e, h = g(), f = {
940
+ const { blockProps: t, inBuilder: l, label: o, placeholder: a, styles: s, inputStyles: r, icon: i, iconPos: p } = e, h = g(), f = {
917
941
  "x-bind:disabled": "formLoading"
918
942
  };
919
943
  return /* @__PURE__ */ n.jsxs(
@@ -922,10 +946,10 @@ const Ye = (e) => {
922
946
  id: h,
923
947
  ...f,
924
948
  ...r,
925
- ...a,
949
+ ...s,
926
950
  ...t || {},
927
951
  type: l ? "button" : "submit",
928
- placeholder: s,
952
+ placeholder: a,
929
953
  children: [
930
954
  o,
931
955
  i && /* @__PURE__ */ n.jsx("span", { className: p, dangerouslySetInnerHTML: { __html: i } })
@@ -957,12 +981,12 @@ d(Ye, {
957
981
  }
958
982
  });
959
983
  const Xe = (e) => {
960
- const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, required: r, checked: i, showLabel: p = !0 } = e, h = g();
961
- return p ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
984
+ const { blockProps: t, fieldName: l, label: o, styles: a, inputStyles: s, required: r, checked: i, showLabel: p = !0 } = e, h = g();
985
+ return p ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
962
986
  /* @__PURE__ */ n.jsx(
963
987
  "input",
964
988
  {
965
- ...a,
989
+ ...s,
966
990
  name: l,
967
991
  id: h,
968
992
  type: "checkbox",
@@ -976,8 +1000,8 @@ const Xe = (e) => {
976
1000
  {
977
1001
  id: h,
978
1002
  ...t,
979
- ...a,
980
1003
  ...s,
1004
+ ...a,
981
1005
  type: "checkbox",
982
1006
  required: r,
983
1007
  name: l
@@ -1004,8 +1028,8 @@ const Ze = (e) => {
1004
1028
  blockProps: t,
1005
1029
  label: l,
1006
1030
  placeholder: o,
1007
- styles: s,
1008
- inputStyles: a,
1031
+ styles: a,
1032
+ inputStyles: s,
1009
1033
  showLabel: r,
1010
1034
  required: i,
1011
1035
  inputType: p = "text",
@@ -1019,20 +1043,20 @@ const Ze = (e) => {
1019
1043
  name: f,
1020
1044
  readOnly: h,
1021
1045
  ...t,
1022
- ...a,
1023
1046
  ...s,
1047
+ ...a,
1024
1048
  type: p,
1025
1049
  placeholder: o,
1026
1050
  required: i
1027
1051
  }
1028
- )) : /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1052
+ )) : /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1029
1053
  r && /* @__PURE__ */ n.jsx("label", { htmlFor: m, children: l }),
1030
1054
  /* @__PURE__ */ n.jsx(
1031
1055
  "input",
1032
1056
  {
1033
1057
  name: f,
1034
1058
  readOnly: h,
1035
- ...a,
1059
+ ...s,
1036
1060
  id: m,
1037
1061
  type: p,
1038
1062
  placeholder: o,
@@ -1074,17 +1098,17 @@ d(Ze, {
1074
1098
  }
1075
1099
  });
1076
1100
  const Je = (e) => {
1077
- const { blockProps: t, fieldName: l, label: o, styles: s, inputStyles: a, checked: r, required: i, showLabel: p = !0 } = e, h = g();
1078
- return p ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1079
- /* @__PURE__ */ n.jsx("input", { ...a, name: l, id: h, type: "radio", required: i, defaultChecked: r }),
1101
+ const { blockProps: t, fieldName: l, label: o, styles: a, inputStyles: s, checked: r, required: i, showLabel: p = !0 } = e, h = g();
1102
+ return p ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1103
+ /* @__PURE__ */ n.jsx("input", { ...s, name: l, id: h, type: "radio", required: i, defaultChecked: r }),
1080
1104
  o && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o })
1081
1105
  ] }) : /* @__PURE__ */ n.jsx(
1082
1106
  "input",
1083
1107
  {
1084
1108
  id: h,
1085
1109
  ...t,
1086
- ...a,
1087
1110
  ...s,
1111
+ ...a,
1088
1112
  type: "radio",
1089
1113
  required: i,
1090
1114
  checked: r,
@@ -1112,26 +1136,26 @@ const Ke = (e) => {
1112
1136
  blockProps: t,
1113
1137
  fieldName: l,
1114
1138
  label: o,
1115
- placeholder: s,
1116
- styles: a,
1139
+ placeholder: a,
1140
+ styles: s,
1117
1141
  inputStyles: r,
1118
1142
  required: i,
1119
1143
  showLabel: p,
1120
1144
  _multiple: h = !1
1121
1145
  } = e, f = g();
1122
- return p ? /* @__PURE__ */ n.jsxs("div", { ...a, children: [
1146
+ return p ? /* @__PURE__ */ n.jsxs("div", { ...s, children: [
1123
1147
  p && /* @__PURE__ */ n.jsx("label", { htmlFor: f, children: o }),
1124
1148
  /* @__PURE__ */ n.jsxs(
1125
1149
  "select",
1126
1150
  {
1127
1151
  ...r,
1128
1152
  id: f,
1129
- placeholder: s,
1153
+ placeholder: a,
1130
1154
  required: i,
1131
1155
  multiple: h,
1132
1156
  name: l,
1133
1157
  children: [
1134
- /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1158
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
1135
1159
  E(e.options, (m) => /* @__PURE__ */ n.jsx(
1136
1160
  "option",
1137
1161
  {
@@ -1148,14 +1172,14 @@ const Ke = (e) => {
1148
1172
  "select",
1149
1173
  {
1150
1174
  id: f,
1151
- ...a,
1175
+ ...s,
1152
1176
  ...t,
1153
- placeholder: s,
1177
+ placeholder: a,
1154
1178
  required: i,
1155
1179
  multiple: h,
1156
1180
  name: l,
1157
1181
  children: [
1158
- /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: s }),
1182
+ /* @__PURE__ */ n.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: a }),
1159
1183
  E(e.options, (m) => /* @__PURE__ */ n.jsx(
1160
1184
  "option",
1161
1185
  {
@@ -1198,10 +1222,10 @@ d(Ke, {
1198
1222
  }
1199
1223
  });
1200
1224
  const Qe = (e) => {
1201
- const { blockProps: t, fieldName: l, label: o, placeholder: s, styles: a, inputStyles: r, _rows: i, showLabel: p } = e, h = g();
1202
- return p ? /* @__PURE__ */ n.jsxs("div", { ...a, ...t, children: [
1225
+ const { blockProps: t, fieldName: l, label: o, placeholder: a, styles: s, inputStyles: r, _rows: i, showLabel: p } = e, h = g();
1226
+ return p ? /* @__PURE__ */ n.jsxs("div", { ...s, ...t, children: [
1203
1227
  p && /* @__PURE__ */ n.jsx("label", { htmlFor: h, children: o }),
1204
- /* @__PURE__ */ n.jsx("textarea", { name: l, ...r, id: h, placeholder: s, rows: i })
1228
+ /* @__PURE__ */ n.jsx("textarea", { name: l, ...r, id: h, placeholder: a, rows: i })
1205
1229
  ] }) : /* @__PURE__ */ n.jsx(
1206
1230
  "textarea",
1207
1231
  {
@@ -1209,8 +1233,8 @@ const Qe = (e) => {
1209
1233
  name: l,
1210
1234
  ...t,
1211
1235
  ...r,
1212
- ...a,
1213
- placeholder: s,
1236
+ ...s,
1237
+ placeholder: a,
1214
1238
  rows: i
1215
1239
  }
1216
1240
  );