@chaibuilder/sdk 1.2.11 → 1.2.12

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 (56) hide show
  1. package/dist/{AddBlocks-TSt8uJY4.js → AddBlocks-ByeMUUzE.js} +11 -11
  2. package/dist/{AddBlocks-k2p8Hy1n.cjs → AddBlocks-nMUkm4og.cjs} +1 -1
  3. package/dist/{BrandingOptions-uFTyYJZj.js → BrandingOptions--poS5shs.js} +1 -1
  4. package/dist/{BrandingOptions-WyVWfFVz.cjs → BrandingOptions-eeDfvB0R.cjs} +1 -1
  5. package/dist/{CanvasArea-iRQqpOak.js → CanvasArea--TKubnIM.js} +21 -21
  6. package/dist/{CanvasArea-5erOZYLy.cjs → CanvasArea-h4lA4oqP.cjs} +1 -1
  7. package/dist/{CurrentPage-NzmJloN7.cjs → CurrentPage-B3YumhrX.cjs} +1 -1
  8. package/dist/{CurrentPage-RCxTz9Mc.js → CurrentPage-Gw9LJ40j.js} +2 -2
  9. package/dist/{Layers-xDG7oltg.cjs → Layers-4r_4F6ST.cjs} +1 -1
  10. package/dist/{Layers-tXB5Pwid.js → Layers-d-xge4On.js} +56 -56
  11. package/dist/{PagesPanel-Jaz9jvye.js → PagesPanel-E4wSgVcE.js} +3 -3
  12. package/dist/{PagesPanel-72nzYB1k.cjs → PagesPanel-iZLDBwXQ.cjs} +1 -1
  13. package/dist/{ProjectPanel-RU0QvH6e.cjs → ProjectPanel-2TcqGnfN.cjs} +1 -1
  14. package/dist/{ProjectPanel--S014Xx3.js → ProjectPanel-q7upaf7h.js} +3 -3
  15. package/dist/{Settings-5EuwaVb3.cjs → Settings-NuDNH2dR.cjs} +1 -1
  16. package/dist/{Settings-gjvl5V1k.js → Settings-y3DHsT88.js} +59 -59
  17. package/dist/{SidePanels-uNCxnGte.cjs → SidePanels-91l1CjYv.cjs} +1 -1
  18. package/dist/{SidePanels-Fq3kRwR0.js → SidePanels-BK_QnEh9.js} +7 -7
  19. package/dist/{Topbar-m5dbbI1f.js → Topbar-b7jnOD57.js} +4 -4
  20. package/dist/{Topbar-JqW89xI5.cjs → Topbar-rEO5z57t.cjs} +1 -1
  21. package/dist/{UnsplashImages-GhBD6owT.js → UnsplashImages-Lb78FYx7.js} +7 -7
  22. package/dist/{UnsplashImages-vACw5hbK.cjs → UnsplashImages-p-WdKs3b.cjs} +1 -1
  23. package/dist/{UploadImages-S1HgxeGb.js → UploadImages-aWG_1r7N.js} +1 -1
  24. package/dist/{UploadImages-PzHdEKHT.cjs → UploadImages-zk-IYDx8.cjs} +1 -1
  25. package/dist/{add-page-modal-2P5hGXOQ.js → add-page-modal-7djj9GZj.js} +12 -12
  26. package/dist/{add-page-modal-GAizM2Jw.cjs → add-page-modal-iUffBbAe.cjs} +1 -1
  27. package/dist/{confirm-alert-57Xq5foA.js → confirm-alert-QuqMrpWn.js} +1 -1
  28. package/dist/{confirm-alert-Uf84DpdR.cjs → confirm-alert-i3FRAgP4.cjs} +1 -1
  29. package/dist/core.cjs +1 -1
  30. package/dist/core.d.ts +8 -0
  31. package/dist/core.js +38 -36
  32. package/dist/{delete-page-modal-ix5IjaFW.js → delete-page-modal-DEBiprds.js} +2 -2
  33. package/dist/{delete-page-modal-MG42FdnU.cjs → delete-page-modal-RllDrgxs.cjs} +1 -1
  34. package/dist/email.cjs +1 -1
  35. package/dist/email.js +2 -2
  36. package/dist/{form-SYcFyACJ.js → form-94xR0NG8.js} +1 -1
  37. package/dist/{form-KBb3kA8g.cjs → form-yz7h2msc.cjs} +1 -1
  38. package/dist/{index-pNYv0oAF.js → index-0m8Zuv5X.js} +306 -294
  39. package/dist/{index-Fj3ead-J.js → index-19nTm_cE.js} +2069 -2059
  40. package/dist/{index-aiHDvS5v.cjs → index-TEfD-2ti.cjs} +1 -1
  41. package/dist/{index-cM3eKmlx.cjs → index-XVud0HL8.cjs} +33 -33
  42. package/dist/{page-viewer-Sh99FGYk.cjs → page-viewer-_ktv1pgX.cjs} +1 -1
  43. package/dist/{page-viewer-VxqOevr4.js → page-viewer-xPLhXv6k.js} +3 -3
  44. package/dist/{project-general-setting-nWOjPiin.js → project-general-setting-XlORLtqJ.js} +3 -3
  45. package/dist/{project-general-setting-VTLHa-Ik.cjs → project-general-setting-nULU3Tzw.cjs} +1 -1
  46. package/dist/{project-seo-setting-ENAKc2Dl.cjs → project-seo-setting-9QkARPhg.cjs} +1 -1
  47. package/dist/{project-seo-setting-70bWTwsB.js → project-seo-setting-KQkeHwny.js} +2 -2
  48. package/dist/{single-page-detail-6L38HJC4.cjs → single-page-detail-Gb6O3Yyw.cjs} +1 -1
  49. package/dist/{single-page-detail-3z7TF-Yy.js → single-page-detail-gtVN9hxR.js} +4 -4
  50. package/dist/studio.cjs +1 -1
  51. package/dist/studio.js +2 -2
  52. package/dist/ui.cjs +1 -1
  53. package/dist/ui.js +25 -25
  54. package/dist/{useAddBlockByDrop-7mUMwNSG.cjs → useAddBlockByDrop-GU5QLPtz.cjs} +1 -1
  55. package/dist/{useAddBlockByDrop-tjQ5DgiO.js → useAddBlockByDrop-b5KJh_7w.js} +1 -1
  56. package/package.json +1 -1
@@ -2,14 +2,14 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import * as ne from "react";
3
3
  import P, { useState as C, useMemo as _, useEffect as O, useCallback as V, memo as dt, createContext as Me, useContext as se } from "react";
4
4
  import { useThrottledCallback as fe } from "@react-hookz/web";
5
- import { forEach as ke, isArray as ie, omit as ct, truncate as pt, includes as E, get as x, first as ue, split as ut, startCase as F, toLower as le, isEmpty as f, map as k, find as xt, last as ve, filter as we, set as Oe, debounce as gt, keys as ht, cloneDeep as yt, each as mt, capitalize as bt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Ye, findLast as jt, flatten as U, intersection as Fe, has as ye, isNull as Ct } from "lodash-es";
5
+ import { forEach as ke, isArray as ie, omit as ct, truncate as pt, includes as E, get as x, first as ue, split as ut, startCase as Y, toLower as le, isEmpty as f, map as k, find as xt, last as ve, filter as we, set as Oe, debounce as gt, keys as ht, cloneDeep as yt, each as mt, capitalize as bt, reject as ft, nth as Ve, startsWith as W, isNumber as vt, parseInt as wt, isNaN as Fe, findLast as jt, flatten as U, intersection as Ye, has as ye, isNull as Ct } from "lodash-es";
6
6
  import { useTranslation as K } from "react-i18next";
7
- import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as T, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as St, ArrowBottomLeftIcon as Tt, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as At, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Yt, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
- import { aS as Ft, aT as Xt, B as xe, aU as zt, aV as Zt, aW as Wt, aX as Ut, aY as Kt, aZ as qt, a_ as Gt, $ as q, ae as Jt, af as Qt, ag as er, a$ as tr, ac as rr, b0 as lr, ad as sr, au as X, av as z, aw as Z, b1 as or, b2 as ar, b3 as nr, b4 as ir, b5 as dr, b6 as cr, a4 as We, a3 as pr, i as ur, b7 as Ue, b8 as de, b9 as ce, ba as pe, ab as Se, L as Ke, Y as qe, j as Ge, ay as Te, bb as xr, m as gr, bc as hr, Z as ge, R as yr, a2 as Je, M as Be, a8 as mr, a5 as br, bd as fr, ai as vr, aj as wr, ak as jr, al as Cr, am as H, be as Qe, ao as kr, ap as Nr, aq as De, ar as $e } from "./index-pNYv0oAF.js";
7
+ import { PlusIcon as Ne, Cross2Icon as Xe, EyeOpenIcon as kt, EyeClosedIcon as He, BorderAllIcon as A, WidthIcon as S, HeightIcon as R, ArrowUpIcon as Q, ArrowRightIcon as ee, ArrowDownIcon as te, ArrowLeftIcon as re, ArrowTopLeftIcon as Nt, ArrowTopRightIcon as _t, ArrowBottomRightIcon as Tt, ArrowBottomLeftIcon as St, AlignLeftIcon as Rt, AlignCenterHorizontallyIcon as Vt, AlignRightIcon as Ht, StretchHorizontallyIcon as Bt, FontItalicIcon as Dt, UnderlineIcon as $t, OverlineIcon as It, LetterCaseUppercaseIcon as Pt, Cross1Icon as At, InfoCircledIcon as _e, MinusIcon as Et, BoxIcon as ze, RowSpacingIcon as Lt, TriangleDownIcon as Mt, CrossCircledIcon as Ot, TrashIcon as Ft, MixerHorizontalIcon as Ze } from "@radix-ui/react-icons";
8
+ import { aT as Yt, aU as Xt, B as xe, aV as zt, aW as Zt, aX as Wt, aY as Ut, aZ as Kt, a_ as qt, a$ as Gt, a0 as q, af as Jt, ag as Qt, ah as er, b0 as tr, ad as rr, b1 as lr, ae as sr, av as X, aw as z, ax as Z, b2 as or, b3 as ar, b4 as nr, b5 as ir, b6 as dr, b7 as cr, a5 as We, a4 as pr, i as ur, b8 as Ue, b9 as de, ba as ce, bb as pe, ac as Te, L as Ke, Z as qe, j as Ge, az as Se, bc as xr, m as gr, bd as hr, _ as ge, U as yr, a3 as Je, M as Be, a9 as mr, a6 as br, be as fr, aj as vr, ak as wr, al as jr, am as Cr, an as H, bf as Qe, ap as kr, aq as Nr, ar as De, as as $e } from "./index-0m8Zuv5X.js";
9
9
  import { u as _r } from "./empty-slot-MWycClTb.js";
10
- import { Check as Sr, EditIcon as Tr, TrashIcon as Rr } from "lucide-react";
10
+ import { Check as Tr, EditIcon as Sr, TrashIcon as Rr } from "lucide-react";
11
11
  import { getBlockComponent as et, getChaiDataProviders as Vr } from "@chaibuilder/runtime";
12
- import { E as tt, u as rt } from "./index-Fj3ead-J.js";
12
+ import { E as tt, u as rt } from "./index-19nTm_cE.js";
13
13
  import { J as Hr, a as Br, d as Dr } from "./index-e0c8PmRQ.js";
14
14
  import $r from "@rjsf/core";
15
15
  import Ir from "@rjsf/validator-ajv8";
@@ -57,7 +57,7 @@ import "sonner";
57
57
  import "./html-to-json-57841sEK.js";
58
58
  import "himalaya";
59
59
  import "./web-blocks.js";
60
- function Yr(r) {
60
+ function Fr(r) {
61
61
  const o = [], t = {};
62
62
  function s(l, d) {
63
63
  ke(d, (a, c) => {
@@ -99,15 +99,15 @@ const je = ({ data: r, fullView: o }) => {
99
99
  dataType: d,
100
100
  appliedBindings: a
101
101
  }) => {
102
- const { paths: c, pathsType: n } = Yr(s), u = r === "PROP" ? et(s == null ? void 0 : s._type) : {}, y = r === "PROP", [i, h] = C(!1), g = _(() => r === "PROP" ? c.filter(
102
+ const { paths: c, pathsType: n } = Fr(s), u = r === "PROP" ? et(s == null ? void 0 : s._type) : {}, y = r === "PROP", [i, h] = C(!1), g = _(() => r === "PROP" ? c.filter(
103
103
  (p) => !E(a, p) && x(u, `props.${ue(ut(p, "."))}.binding`)
104
104
  ) : c.filter((p) => d === x(n, p, "")), [r, c, a, d, u]);
105
105
  return O(() => {
106
106
  o && l(o);
107
107
  }, [o, r]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
108
108
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-4", children: [
109
- /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: F(le(r)) }),
110
- /* @__PURE__ */ e.jsxs(Ft, { open: i, onOpenChange: h, children: [
109
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: Y(le(r)) }),
110
+ /* @__PURE__ */ e.jsxs(Yt, { open: i, onOpenChange: h, children: [
111
111
  /* @__PURE__ */ e.jsx(Xt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
112
112
  xe,
113
113
  {
@@ -116,13 +116,13 @@ const je = ({ data: r, fullView: o }) => {
116
116
  className: ` ${f(o) ? "w-44 justify-center bg-blue-500 text-gray-100 hover:bg-blue-400 hover:text-white" : "min-w-[350px] items-center justify-between"}`,
117
117
  children: o ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
118
118
  /* @__PURE__ */ e.jsxs("span", { className: "pr-8 text-sm", children: [
119
- y && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(d) }),
119
+ y && /* @__PURE__ */ e.jsx("span", { className: "mr-2 rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(d) }),
120
120
  o
121
121
  ] }),
122
122
  /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer text-[9px] text-blue-400 underline hover:text-blue-700", children: "Change" })
123
123
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
124
124
  "+ Set ",
125
- F(le(r))
125
+ Y(le(r))
126
126
  ] })
127
127
  }
128
128
  ) }),
@@ -140,10 +140,10 @@ const je = ({ data: r, fullView: o }) => {
140
140
  },
141
141
  children: [
142
142
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
143
- /* @__PURE__ */ e.jsx(Sr, { className: `h-4 w-4 text-green-500 ${o === p ? "" : "opacity-0"}` }),
143
+ /* @__PURE__ */ e.jsx(Tr, { className: `h-4 w-4 text-green-500 ${o === p ? "" : "opacity-0"}` }),
144
144
  p
145
145
  ] }),
146
- y ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: F(x(n, p, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(s, p) }) })
146
+ y ? /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("span", { className: "rounded-full bg-purple-100 px-2 py-0.5 text-[10px] text-purple-500", children: Y(x(n, p, "")) }) }) : /* @__PURE__ */ e.jsx("div", { className: "pl-6", children: /* @__PURE__ */ e.jsx(je, { data: x(s, p) }) })
147
147
  ]
148
148
  },
149
149
  p
@@ -154,7 +154,7 @@ const je = ({ data: r, fullView: o }) => {
154
154
  ] }),
155
155
  !y && !f(o) && /* @__PURE__ */ e.jsx("div", { className: "pt-2", children: /* @__PURE__ */ e.jsx(je, { data: x(s, o, ""), fullView: !0 }) })
156
156
  ] });
157
- }, Fr = ({
157
+ }, Yr = ({
158
158
  appliedBindings: r = [],
159
159
  onAddBinding: o,
160
160
  editMode: t,
@@ -232,7 +232,7 @@ const je = ({ data: r, fullView: o }) => {
232
232
  return /* @__PURE__ */ e.jsxs(rr, { children: [
233
233
  /* @__PURE__ */ e.jsx(lr, { disabled: r, asChild: !0, onClick: () => c(!0), children: o }),
234
234
  a && /* @__PURE__ */ e.jsx(sr, { children: /* @__PURE__ */ e.jsx(
235
- Fr,
235
+ Yr,
236
236
  {
237
237
  item: d,
238
238
  editMode: l,
@@ -267,7 +267,7 @@ const je = ({ data: r, fullView: o }) => {
267
267
  /* @__PURE__ */ e.jsx("div", { className: "font-medium leading-5", children: r.value }),
268
268
  /* @__PURE__ */ e.jsx(je, { data: x(l, r.value, "") }),
269
269
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
270
- /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: o, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(Tr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
270
+ /* @__PURE__ */ e.jsx(lt, { editMode: !0, onAddBinding: o, appliedBindings: d, item: r, children: /* @__PURE__ */ e.jsx(Sr, { className: "mt-1 h-6 w-6 cursor-pointer rounded border border-blue-400 p-1 text-blue-400 duration-200 hover:scale-105 hover:bg-blue-400 hover:text-white" }) }),
271
271
  /* @__PURE__ */ e.jsx(
272
272
  Rr,
273
273
  {
@@ -276,7 +276,7 @@ const je = ({ data: r, fullView: o }) => {
276
276
  }
277
277
  )
278
278
  ] }),
279
- !f(a) && !f(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: F(a) })
279
+ !f(a) && !f(r.key) && /* @__PURE__ */ e.jsx("div", { className: "absolute right-0 top-1 mt-px flex h-4 items-center rounded-full px-2 text-[10px] font-medium text-purple-600", children: Y(a) })
280
280
  ] });
281
281
  }, zr = ({ bindingData: r, onChange: o }) => {
282
282
  const t = q(), [s] = rt(), l = Vr(), [d, a] = C(
@@ -455,15 +455,15 @@ const Pe = new Er(Lr, {
455
455
  });
456
456
  function Ur() {
457
457
  var D;
458
- const [r] = Se(), o = q(), t = Ke(), s = qe(), [l] = Ge(), [d, a] = C(""), c = (D = ue(r)) == null ? void 0 : D.prop, n = ft((x(o, c, "").replace(Or, "").split(",").pop() || "").split(" "), f), u = () => {
458
+ const [r] = Te(), o = q(), t = Ke(), s = qe(), [l] = Ge(), [d, a] = C(""), c = (D = ue(r)) == null ? void 0 : D.prop, n = ft((x(o, c, "").replace(Or, "").split(",").pop() || "").split(" "), f), u = () => {
459
459
  const j = d.trim().toLowerCase().replace(/ +(?= )/g, "").split(" ");
460
460
  t(l, j, !0), a("");
461
461
  }, [y, i] = C([]), h = ({ value: j }) => {
462
462
  const I = j.trim().toLowerCase(), L = I.match(/.+:/g);
463
463
  let N = [];
464
464
  if (L && L.length > 0) {
465
- const [$] = L, Y = I.replace($, "");
466
- N = Pe.search(Y).map((m) => ({
465
+ const [$] = L, F = I.replace($, "");
466
+ N = Pe.search(F).map((m) => ({
467
467
  ...m,
468
468
  item: { ...m.item, name: $ + m.item.name }
469
469
  }));
@@ -490,7 +490,7 @@ function Ur() {
490
490
  {
491
491
  className: `no-scrollbar flex ${y.length > 0 ? "min-h-[300px]" : "min-h-max"} w-full flex-col gap-y-5 overflow-y-auto bg-gray-100 px-px`,
492
492
  children: [
493
- /* @__PURE__ */ e.jsx(Te, { className: "mt-2", children: "Add Tailwind classes" }),
493
+ /* @__PURE__ */ e.jsx(Se, { className: "mt-2", children: "Add Tailwind classes" }),
494
494
  /* @__PURE__ */ e.jsxs("div", { className: "relative -mt-4 flex items-center gap-x-3", children: [
495
495
  /* @__PURE__ */ e.jsx("div", { className: "relative flex w-full items-center gap-x-3", children: /* @__PURE__ */ e.jsx(
496
496
  Ar,
@@ -981,32 +981,32 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
981
981
  // display
982
982
  hidden: He,
983
983
  gap: A,
984
- gapX: T,
984
+ gapX: S,
985
985
  gapY: R,
986
- spaceX: T,
986
+ spaceX: S,
987
987
  spaceY: R,
988
988
  overscroll: A,
989
- overscrollX: T,
989
+ overscrollX: S,
990
990
  overscrollY: R,
991
991
  overflow: A,
992
- overflowX: T,
992
+ overflowX: S,
993
993
  overflowY: R,
994
994
  top: Q,
995
995
  right: ee,
996
996
  bottom: te,
997
997
  left: re,
998
998
  inset: A,
999
- insetX: T,
999
+ insetX: S,
1000
1000
  insetY: R,
1001
1001
  border: A,
1002
- borderX: T,
1002
+ borderX: S,
1003
1003
  borderY: R,
1004
1004
  borderTop: Q,
1005
1005
  borderRight: ee,
1006
1006
  borderBottom: te,
1007
1007
  borderLeft: re,
1008
1008
  borderRadius: A,
1009
- borderRadiusX: T,
1009
+ borderRadiusX: S,
1010
1010
  borderRadiusY: R,
1011
1011
  borderRadiusTop: Q,
1012
1012
  borderRadiusRight: ee,
@@ -1014,20 +1014,20 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
1014
1014
  borderRadiusLeft: re,
1015
1015
  borderRadiusTopLeft: Nt,
1016
1016
  borderRadiusTopRight: _t,
1017
- borderRadiusBottomRight: St,
1018
- borderRadiusBottomLeft: Tt,
1019
- divideXWidth: T,
1017
+ borderRadiusBottomRight: Tt,
1018
+ borderRadiusBottomLeft: St,
1019
+ divideXWidth: S,
1020
1020
  divideYWidth: R,
1021
1021
  scale: A,
1022
- scaleX: T,
1022
+ scaleX: S,
1023
1023
  scaleY: R,
1024
- skewX: T,
1024
+ skewX: S,
1025
1025
  skewY: R,
1026
- translateX: T,
1026
+ translateX: S,
1027
1027
  translateY: R,
1028
1028
  // padding
1029
1029
  padding: A,
1030
- paddingX: T,
1030
+ paddingX: S,
1031
1031
  paddingY: R,
1032
1032
  paddingTop: Q,
1033
1033
  paddingRight: ee,
@@ -1035,7 +1035,7 @@ const B = ["px", "%", "em", "rem", "ch", "vh", "vw"], Kr = {
1035
1035
  paddingLeft: re,
1036
1036
  // margin
1037
1037
  margin: A,
1038
- marginX: T,
1038
+ marginX: S,
1039
1039
  marginY: R,
1040
1040
  marginTop: Q,
1041
1041
  marginRight: ee,
@@ -1258,7 +1258,7 @@ const Qr = ({ property: r, onChange: o }) => {
1258
1258
  children: P.createElement(x(st, a, ze))
1259
1259
  }
1260
1260
  ) }),
1261
- /* @__PURE__ */ e.jsx(Z, { children: F(le(a)) })
1261
+ /* @__PURE__ */ e.jsx(Z, { children: Y(le(a)) })
1262
1262
  ] })) });
1263
1263
  }, tl = {
1264
1264
  backgroundColor: "bg",
@@ -1543,21 +1543,21 @@ const sl = (r) => {
1543
1543
  }
1544
1544
  h(v), l(v === "class" || f(m) ? "" : m);
1545
1545
  }, [d, n, u]);
1546
- const N = fe((m) => a(m), [a], Ee), $ = fe((m) => a(m, !1), [a], Ee), Y = V(
1546
+ const N = fe((m) => a(m), [a], Ee), $ = fe((m) => a(m, !1), [a], Ee), F = V(
1547
1547
  (m = !1) => {
1548
1548
  const v = Ae(`${s}`, u);
1549
1549
  if (x(v, "error", !1)) {
1550
1550
  p(!0);
1551
1551
  return;
1552
1552
  }
1553
- const S = x(v, "unit") !== "" ? x(v, "unit") : i;
1554
- if (S === "auto" || S === "none") {
1555
- N(`${c}${S}`);
1553
+ const T = x(v, "unit") !== "" ? x(v, "unit") : i;
1554
+ if (T === "auto" || T === "none") {
1555
+ N(`${c}${T}`);
1556
1556
  return;
1557
1557
  }
1558
1558
  if (x(v, "value") === "")
1559
1559
  return;
1560
- const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1560
+ const J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1561
1561
  m ? $(J) : N(J);
1562
1562
  },
1563
1563
  [N, $, s, i, c, u]
@@ -1574,7 +1574,7 @@ const sl = (r) => {
1574
1574
  }
1575
1575
  if (x(v, "value") === "")
1576
1576
  return;
1577
- const S = x(v, "unit") !== "" ? x(v, "unit") : m, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${S === "-" ? "" : S}]`;
1577
+ const T = x(v, "unit") !== "" ? x(v, "unit") : m, J = `${x(v, "value", "").startsWith("-") ? "-" : ""}${c}[${x(v, "value", "").replace("-", "")}${T === "-" ? "" : T}]`;
1578
1578
  N(J);
1579
1579
  },
1580
1580
  [N, s, c, u]
@@ -1592,22 +1592,22 @@ const sl = (r) => {
1592
1592
  {
1593
1593
  readOnly: i === "class",
1594
1594
  onKeyPress: (m) => {
1595
- m.key === "Enter" && Y();
1595
+ m.key === "Enter" && F();
1596
1596
  },
1597
1597
  onKeyDown: (m) => {
1598
1598
  if (m.keyCode !== 38 && m.keyCode !== 40)
1599
1599
  return;
1600
1600
  m.preventDefault(), L(!0);
1601
1601
  const v = wt(m.target.value);
1602
- let S = Ye(v) ? 0 : v;
1603
- m.keyCode === 38 && (S += 1), m.keyCode === 40 && (S -= 1);
1604
- const M = `${S}`, it = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${i === "-" ? "" : i}]`;
1602
+ let T = Fe(v) ? 0 : v;
1603
+ m.keyCode === 38 && (T += 1), m.keyCode === 40 && (T -= 1);
1604
+ const M = `${T}`, it = `${M.startsWith("-") ? "-" : ""}${c}[${M.replace("-", "")}${i === "-" ? "" : i}]`;
1605
1605
  $(it);
1606
1606
  },
1607
1607
  onKeyUp: (m) => {
1608
1608
  I && (m.preventDefault(), L(!1));
1609
1609
  },
1610
- onBlur: () => Y(),
1610
+ onBlur: () => F(),
1611
1611
  onChange: (m) => {
1612
1612
  p(!1), l(m.target.value);
1613
1613
  },
@@ -1760,11 +1760,11 @@ const sl = (r) => {
1760
1760
  }, pl = (r) => `${r.toUpperCase()} ${Le[r] ? `(${Le[r]} & up)` : ""}`, Re = (r) => {
1761
1761
  const { t: o } = K(), { type: t = "icons", label: s, property: l, onEmitChange: d = () => {
1762
1762
  }, units: a, negative: c = !1 } = r, [n] = yr(), [u] = Je(), [, y] = Be(), i = ae(l), h = Ke(), g = qe(), [p] = Ge(), b = _(() => x(i, "fullCls", ""), [i]), w = V(
1763
- ($, Y = !0) => {
1763
+ ($, F = !0) => {
1764
1764
  const G = { dark: n, mq: y, mod: u, cls: $, property: l, fullCls: "" };
1765
1765
  (n || u !== "") && (G.mq = "xs");
1766
1766
  const m = Mr(G);
1767
- h(p, [m], Y);
1767
+ h(p, [m], F);
1768
1768
  },
1769
1769
  [p, n, y, u, l, h]
1770
1770
  ), D = V(() => {
@@ -1871,7 +1871,7 @@ const sl = (r) => {
1871
1871
  ]
1872
1872
  }
1873
1873
  ) }),
1874
- /* @__PURE__ */ e.jsx(Z, { children: F(le(h)) })
1874
+ /* @__PURE__ */ e.jsx(Z, { children: Y(le(h)) })
1875
1875
  ] }) }))
1876
1876
  ) })
1877
1877
  ] }),
@@ -1895,7 +1895,7 @@ const sl = (r) => {
1895
1895
  ), a = U(
1896
1896
  o.map((n) => n.styleType === "accordion" ? d(n.items) : n.styleType === "multiple" ? k(n.options, "key") : n.property)
1897
1897
  ), c = k(s, "property");
1898
- return Fe(a, c).length > 0;
1898
+ return Ye(a, c).length > 0;
1899
1899
  }, [s, o]);
1900
1900
  return /* @__PURE__ */ e.jsxs("details", { children: [
1901
1901
  /* @__PURE__ */ e.jsx("summary", { className: "my-px cursor-default rounded-md bg-background p-px px-2 text-[11px] text-foreground", children: /* @__PURE__ */ e.jsxs("div", { className: "inline", children: [
@@ -1932,7 +1932,7 @@ const sl = (r) => {
1932
1932
  ), c = U(
1933
1933
  r.items.map((u) => u.styleType === "accordion" ? a(u.items) : u.styleType === "multiple" ? U(k(u.options, "key")) : u.property)
1934
1934
  ), n = k(t, "property");
1935
- return Fe(c, n).length > 0;
1935
+ return Ye(c, n).length > 0;
1936
1936
  }, [t, r.heading, r.items]), d = _(() => ({}), []);
1937
1937
  return /* @__PURE__ */ e.jsx(gl.Provider, { value: d, children: /* @__PURE__ */ e.jsxs(de, { value: r.heading, children: [
1938
1938
  /* @__PURE__ */ e.jsx(ce, { className: "px-3 py-2 text-xs hover:no-underline", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-x-2", children: [
@@ -1976,7 +1976,7 @@ const sl = (r) => {
1976
1976
  }
1977
1977
  ),
1978
1978
  /* @__PURE__ */ e.jsx(
1979
- Yt,
1979
+ Ft,
1980
1980
  {
1981
1981
  onClick: l,
1982
1982
  className: "h-6 w-6 cursor-pointer rounded border border-red-400 p-1 text-red-400 hover:opacity-80"
@@ -1985,7 +1985,7 @@ const sl = (r) => {
1985
1985
  ] })
1986
1986
  ] }), yl = ({ section: r }) => {
1987
1987
  var h;
1988
- const { setSyncState: o } = mr(), t = q(), [s, l] = C([]), [d] = Se(), a = We(), c = `${x(d, "0.prop")}_attrs`;
1988
+ const { setSyncState: o } = mr(), t = q(), [s, l] = C([]), [d] = Te(), a = We(), c = `${x(d, "0.prop")}_attrs`;
1989
1989
  ne.useEffect(() => {
1990
1990
  const g = k(x(t, c), (p, b) => ({ key: b, value: p }));
1991
1991
  f(g) ? l([]) : l(g);
@@ -2016,7 +2016,7 @@ const sl = (r) => {
2016
2016
  "Attributes"
2017
2017
  ] }) }),
2018
2018
  /* @__PURE__ */ e.jsx(pe, { className: "bg-gray-100 px-3.5 py-2", children: /* @__PURE__ */ e.jsxs("div", { className: "no-scrollbar flex min-h-max flex-col gap-y-2 overflow-y-auto bg-gray-100 p-px", children: [
2019
- /* @__PURE__ */ e.jsxs(Te, { className: "mt-2 flex w-full items-center justify-between", children: [
2019
+ /* @__PURE__ */ e.jsxs(Se, { className: "mt-2 flex w-full items-center justify-between", children: [
2020
2020
  "Add Custom attributes",
2021
2021
  /* @__PURE__ */ e.jsxs(
2022
2022
  "div",
@@ -2055,7 +2055,7 @@ const sl = (r) => {
2055
2055
  ] });
2056
2056
  };
2057
2057
  function ml() {
2058
- const [r, o] = Je(), { flexChild: t, gridChild: s } = br(), [, l] = Pr(fr), { t: d } = K(), [a] = Se();
2058
+ const [r, o] = Je(), { flexChild: t, gridChild: s } = br(), [, l] = Pr(fr), { t: d } = K(), [a] = Te();
2059
2059
  return f(a) ? /* @__PURE__ */ e.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 rounded-xl p-4", children: [
2060
2060
  /* @__PURE__ */ e.jsx(Ze, { className: "mx-auto text-3xl" }),
2061
2061
  /* @__PURE__ */ e.jsx("h1", { children: d("no_styling_block_selected") })
@@ -2063,7 +2063,7 @@ function ml() {
2063
2063
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
2064
2064
  /* @__PURE__ */ e.jsxs("div", { onClick: () => l(!1), className: "flex h-full flex-col", children: [
2065
2065
  /* @__PURE__ */ e.jsx("div", { className: "flex h-12 flex-col space-x-4 space-y-3 border-b border-border px-4 py-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-x-1.5", children: [
2066
- /* @__PURE__ */ e.jsx(Te, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2066
+ /* @__PURE__ */ e.jsx(Se, { htmlFor: "", className: "flex gap-x-1.5 text-xs italic", children: "State" }),
2067
2067
  /* @__PURE__ */ e.jsxs(vr, { defaultValue: r, onValueChange: (c) => o(c), children: [
2068
2068
  /* @__PURE__ */ e.jsx(wr, { className: "h-auto w-fit p-1 px-3", children: /* @__PURE__ */ e.jsx(jr, { placeholder: "State" }) }),
2069
2069
  /* @__PURE__ */ e.jsxs(Cr, { children: [
@@ -2116,7 +2116,7 @@ const bl = {
2116
2116
  (n) => {
2117
2117
  const u = !x(l, "negative", !1), y = x(l, "cssProperty", "");
2118
2118
  let i = parseFloat(l.dragStartValue);
2119
- i = Ye(i) ? 0 : i;
2119
+ i = Fe(i) ? 0 : i;
2120
2120
  let h = bl[l.dragUnit];
2121
2121
  (W(y, "scale") || y === "opacity") && (h = 10);
2122
2122
  let p = (l.dragStartY - n.pageY) / h + i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),w=require("@radix-ui/react-icons"),i=require("react"),k=require("jotai"),a=require("lodash-es"),s=require("./index-aiHDvS5v.cjs"),g=require("lucide-react"),C=require("@chaibuilder/runtime"),q=require("react-i18next"),b=require("./index-gi1LIOCw.cjs"),P=require("./index-cM3eKmlx.cjs"),T=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("./web-blocks.cjs");require("./empty-slot-TF2kd-0X.cjs");const D=({provider:t,onClose:x})=>{const{t:n}=q.useTranslation(),[l,p]=i.useState(null);return i.useEffect(()=>{t&&(t.mockFn?t.mockFn:t.dataFn)().then(u=>p(u))},[t]),t?e.jsxRuntimeExports.jsx(s.Dialog,{onOpenChange:c=>c?"":x(),defaultOpen:!0,children:e.jsxRuntimeExports.jsxs(s.DialogContent,{children:[e.jsxRuntimeExports.jsxs(s.DialogHeader,{children:[e.jsxRuntimeExports.jsxs(s.DialogTitle,{children:[n("data_provider"),": ",t.name]}),e.jsxRuntimeExports.jsx(s.DialogDescription,{children:t.description})]}),e.jsxRuntimeExports.jsx(P.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(b.JsonView,{data:l,shouldExpandNode:b.allExpanded,style:{...b.defaultStyles,container:"max-h-[80vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",stringValue:"text-orange-600",label:"text-green-900 font-semibold pr-1 tracking-wider"}})})]})}):null};function A({children:t,name:x,onRemove:n}){const{t:l}=q.useTranslation();return e.jsxRuntimeExports.jsxs(s.AlertDialog,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTrigger,{asChild:!0,children:t}),e.jsxRuntimeExports.jsxs(s.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(s.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTitle,{dangerouslySetInnerHTML:{__html:l("remove_provider_confirmation").replace("{name}",x)}}),e.jsxRuntimeExports.jsx(s.AlertDialogDescription,{children:l("remove_provider_warning")})]}),e.jsxRuntimeExports.jsxs(s.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogCancel,{children:l("cancel")}),e.jsxRuntimeExports.jsx(s.AlertDialogAction,{onClick:n,className:"bg-red-600 hover:bg-red-700",children:l("remove")})]})]})]})}const _=()=>{const{t}=q.useTranslation(),x=i.useMemo(()=>C.getChaiDataProviders(),[]),[n,l]=s.usePageDataProviders(),[,p]=k.useAtom(s.pageSyncStateAtom),[c,u]=i.useState(a.filter(x,r=>a.map(n,"providerKey").includes(r.providerKey))),[E,v]=i.useState(""),[d,f]=i.useState(null),R=a.filter(x.map(r=>a.map(c,"providerKey").includes(r.providerKey)?null:{value:r.providerKey,label:r.name}),r=>!a.isNull(r)),o=r=>{const j=a.find(x,{providerKey:r});u(m=>[...m,j]),l(m=>[...m,{providerKey:j.providerKey,args:{}}]),v(""),p("UNSAVED")},h=r=>{u(j=>a.filter(j,m=>m.providerKey!==r.providerKey)),l(j=>a.filter(j,m=>m.providerKey!==r.providerKey)),p("UNSAVED")},S=r=>f(r);return a.isEmpty(x)?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsxs("p",{className:"mb-1.5 p-4 text-xs text-gray-500",children:[t("no_data_providers"),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("a",{className:"text-blue-500",href:"https://chaibuilder.com/docs/registering-data-providers",target:"_blank",children:t("learn_more")})]})}):e.jsxRuntimeExports.jsxs("div",{className:"px-1",children:[e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("label",{children:e.jsxRuntimeExports.jsx("p",{className:"mb-1.5 text-xs text-gray-500",children:t("add_data_providers")})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-1",children:e.jsxRuntimeExports.jsxs(s.Select,{value:E,onValueChange:r=>o(r),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:t("select_provider")})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:t("choose")}),R.map(r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.value,children:r.label},r.value))]})]})}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("div",{className:`border-t ${c.length?"block":"hidden"}`,children:[e.jsxRuntimeExports.jsxs("p",{className:"flex-1 pb-1.5 pt-4 text-xs font-medium text-gray-500",children:[t("page_data_providers"),":"]}),e.jsxRuntimeExports.jsx("div",{className:"space-y-2",children:c.map(r=>e.jsxRuntimeExports.jsxs("div",{className:"w-full rounded-lg border bg-card text-card-foreground shadow-sm","data-v0-t":"card",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col space-y-1.5 px-4 pt-4",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",{className:"font-medium leading-4",children:r.name}),e.jsxRuntimeExports.jsx("p",{className:"pt-1 text-xs text-gray-400",children:r.description})]})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-2 py-2",children:[e.jsxRuntimeExports.jsxs("button",{onClick:()=>S(r),className:"inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-blue-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:[e.jsxRuntimeExports.jsxs("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",className:"mr-2 h-4 w-4",children:[e.jsxRuntimeExports.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),t("view_data")]}),e.jsxRuntimeExports.jsx(A,{onRemove:()=>h(r),name:r.name,children:e.jsxRuntimeExports.jsxs("button",{className:"inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-red-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:[e.jsxRuntimeExports.jsxs("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",className:"mr-2 h-4 w-4",children:[e.jsxRuntimeExports.jsx("path",{d:"M3 6h18"}),e.jsxRuntimeExports.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsxRuntimeExports.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]}),t("remove")]})})]})]},r.providerKey))}),e.jsxRuntimeExports.jsx(D,{onClose:()=>f(null),provider:d})]})]})},B=i.lazy(()=>Promise.resolve().then(()=>require("./AddBlocks-k2p8Hy1n.cjs"))),y=i.lazy(()=>Promise.resolve().then(()=>require("./Layers-xDG7oltg.cjs"))),z=i.lazy(()=>Promise.resolve().then(()=>require("./BrandingOptions-WyVWfFVz.cjs"))),I=i.lazy(()=>Promise.resolve().then(()=>require("./index-aiHDvS5v.cjs")).then(t=>t.ImagesPanel));let N=null;const K=()=>{const t=s.useBuilderProp("sideBarComponents.top",[]),x=s.useBuilderProp("sideBarComponents.bottom",[]),[n,l]=k.useAtom(s.activePanelAtom),[p,c]=i.useState(n),[u,E]=i.useState(null),v={"add-blocks":B,layers:y,"branding-options":z,images:I};a.each(t,({name:o,panel:h})=>{v[o]=h});const d=o=>{clearTimeout(N),n!=="layers"&&o==="layers"?N=setTimeout(()=>l("layers"),500):c(o),l(o)},f=s.useBuilderProp("dataBindingSupport",!1);function R(){const o=setTimeout(()=>{u&&(d("layers"),clearTimeout(u))},500);E(o)}return e.jsxRuntimeExports.jsxs("div",{className:"relative flex",children:[n!=="layers"?e.jsxRuntimeExports.jsx("div",{onMouseEnter:R,onClick:()=>d("layers"),className:"fixed inset-0 z-[50] bg-black/20"}):null,e.jsxRuntimeExports.jsxs("div",{className:"z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100] flex w-14 flex-col items-center space-y-2",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{d("add-blocks")},size:"sm",variant:n==="add-blocks"?"default":"outline",children:e.jsxRuntimeExports.jsx(w.PlusIcon,{className:"text-xl"})}),e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d("layers"),size:"sm",variant:n==="layers"?"default":"outline",children:e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"w-4"})}),e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d("branding-options"),size:"sm",variant:n==="branding-options"?"default":"outline",children:e.jsxRuntimeExports.jsx(w.Half2Icon,{className:"w-4 max-w-[40px] text-xs"})}),i.Children.toArray(t.map(({name:o,icon:h})=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d(o),size:"sm",className:"w-10",variant:n===o?"default":"outline",children:e.jsxRuntimeExports.jsx(h,{})})})))]}),e.jsxRuntimeExports.jsx("div",{className:"relative z-[100] flex w-14 flex-col items-center space-y-2",children:i.Children.toArray(x.map(o=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(o,{})})))})]}),e.jsxRuntimeExports.jsx("div",{className:`absolute left-14 z-[50] h-full w-96 border-r bg-background duration-500 ease-in-out ${n!=="layers"?"translate-x-0":"-translate-x-full"}`,children:e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 bg-white p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:e.jsxRuntimeExports.jsx("div",{className:T.cn("relative h-full max-h-[93%] overflow-y-auto overflow-x-hidden bg-background p-1",n==="layers"?"":"z-[100]"),onMouseEnter:()=>{u&&clearTimeout(u)},children:i.createElement(a.get(v,n,()=>e.jsxRuntimeExports.jsx("div",{})))})})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-60 border-r p-1",children:e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:f?e.jsxRuntimeExports.jsxs(s.Tabs,{defaultValue:"layers",className:"flex h-full w-full flex-col py-1",children:[e.jsxRuntimeExports.jsxs(s.TabsList,{className:"mx-1 grid h-10 grid-cols-2",children:[e.jsxRuntimeExports.jsxs(s.TabsTrigger,{value:"layers",children:[e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"mr-2 h-3"})," Layers"]}),e.jsxRuntimeExports.jsxs(s.TabsTrigger,{value:"data-provider",children:[e.jsxRuntimeExports.jsx(g.DatabaseIcon,{className:"mr-2 w-3"}),"Data"]})]}),e.jsxRuntimeExports.jsx(s.TabsContent,{value:"layers",className:"no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden",children:i.createElement(y)}),e.jsxRuntimeExports.jsx(s.TabsContent,{value:"data-provider",className:"flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(_,{})})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md bg-gray-200 py-1",children:[e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"ml-2 mr-2 h-4"})," Layers"]}),e.jsxRuntimeExports.jsx("div",{className:"no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden",children:i.createElement(y)})]})})})]})};exports.default=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),w=require("@radix-ui/react-icons"),i=require("react"),k=require("jotai"),a=require("lodash-es"),s=require("./index-TEfD-2ti.cjs"),g=require("lucide-react"),C=require("@chaibuilder/runtime"),q=require("react-i18next"),b=require("./index-gi1LIOCw.cjs"),P=require("./index-XVud0HL8.cjs"),T=require("./Functions-N3yhPYKY.cjs");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");require("clsx");require("tailwind-merge");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");require("i18next");require("@floating-ui/react-dom");require("react-textarea-autosize");require("flagged");require("react-dnd");require("@minoru/react-dnd-treeview");require("react-hotkeys-hook");require("sonner");require("./html-to-json-2PeOCVey.cjs");require("himalaya");require("./web-blocks.cjs");require("./empty-slot-TF2kd-0X.cjs");const D=({provider:t,onClose:x})=>{const{t:n}=q.useTranslation(),[l,p]=i.useState(null);return i.useEffect(()=>{t&&(t.mockFn?t.mockFn:t.dataFn)().then(u=>p(u))},[t]),t?e.jsxRuntimeExports.jsx(s.Dialog,{onOpenChange:c=>c?"":x(),defaultOpen:!0,children:e.jsxRuntimeExports.jsxs(s.DialogContent,{children:[e.jsxRuntimeExports.jsxs(s.DialogHeader,{children:[e.jsxRuntimeExports.jsxs(s.DialogTitle,{children:[n("data_provider"),": ",t.name]}),e.jsxRuntimeExports.jsx(s.DialogDescription,{children:t.description})]}),e.jsxRuntimeExports.jsx(P.ErrorBoundary,{children:e.jsxRuntimeExports.jsx(b.JsonView,{data:l,shouldExpandNode:b.allExpanded,style:{...b.defaultStyles,container:"max-h-[80vh] overflow-y-auto text-[12px] leading-[1.5] tracking-wide font-mono",stringValue:"text-orange-600",label:"text-green-900 font-semibold pr-1 tracking-wider"}})})]})}):null};function A({children:t,name:x,onRemove:n}){const{t:l}=q.useTranslation();return e.jsxRuntimeExports.jsxs(s.AlertDialog,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTrigger,{asChild:!0,children:t}),e.jsxRuntimeExports.jsxs(s.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(s.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogTitle,{dangerouslySetInnerHTML:{__html:l("remove_provider_confirmation").replace("{name}",x)}}),e.jsxRuntimeExports.jsx(s.AlertDialogDescription,{children:l("remove_provider_warning")})]}),e.jsxRuntimeExports.jsxs(s.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(s.AlertDialogCancel,{children:l("cancel")}),e.jsxRuntimeExports.jsx(s.AlertDialogAction,{onClick:n,className:"bg-red-600 hover:bg-red-700",children:l("remove")})]})]})]})}const _=()=>{const{t}=q.useTranslation(),x=i.useMemo(()=>C.getChaiDataProviders(),[]),[n,l]=s.usePageDataProviders(),[,p]=k.useAtom(s.pageSyncStateAtom),[c,u]=i.useState(a.filter(x,r=>a.map(n,"providerKey").includes(r.providerKey))),[E,v]=i.useState(""),[d,f]=i.useState(null),R=a.filter(x.map(r=>a.map(c,"providerKey").includes(r.providerKey)?null:{value:r.providerKey,label:r.name}),r=>!a.isNull(r)),o=r=>{const j=a.find(x,{providerKey:r});u(m=>[...m,j]),l(m=>[...m,{providerKey:j.providerKey,args:{}}]),v(""),p("UNSAVED")},h=r=>{u(j=>a.filter(j,m=>m.providerKey!==r.providerKey)),l(j=>a.filter(j,m=>m.providerKey!==r.providerKey)),p("UNSAVED")},S=r=>f(r);return a.isEmpty(x)?e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsxs("p",{className:"mb-1.5 p-4 text-xs text-gray-500",children:[t("no_data_providers"),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("a",{className:"text-blue-500",href:"https://chaibuilder.com/docs/registering-data-providers",target:"_blank",children:t("learn_more")})]})}):e.jsxRuntimeExports.jsxs("div",{className:"px-1",children:[e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsx("label",{children:e.jsxRuntimeExports.jsx("p",{className:"mb-1.5 text-xs text-gray-500",children:t("add_data_providers")})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-1",children:e.jsxRuntimeExports.jsxs(s.Select,{value:E,onValueChange:r=>o(r),children:[e.jsxRuntimeExports.jsx(s.SelectTrigger,{className:"w-full",children:e.jsxRuntimeExports.jsx(s.SelectValue,{placeholder:t("select_provider")})}),e.jsxRuntimeExports.jsxs(s.SelectContent,{children:[e.jsxRuntimeExports.jsx(s.SelectItem,{value:"",children:t("choose")}),R.map(r=>e.jsxRuntimeExports.jsx(s.SelectItem,{value:r.value,children:r.label},r.value))]})]})}),e.jsxRuntimeExports.jsx("br",{}),e.jsxRuntimeExports.jsxs("div",{className:`border-t ${c.length?"block":"hidden"}`,children:[e.jsxRuntimeExports.jsxs("p",{className:"flex-1 pb-1.5 pt-4 text-xs font-medium text-gray-500",children:[t("page_data_providers"),":"]}),e.jsxRuntimeExports.jsx("div",{className:"space-y-2",children:c.map(r=>e.jsxRuntimeExports.jsxs("div",{className:"w-full rounded-lg border bg-card text-card-foreground shadow-sm","data-v0-t":"card",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col space-y-1.5 px-4 pt-4",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center justify-between",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",{className:"font-medium leading-4",children:r.name}),e.jsxRuntimeExports.jsx("p",{className:"pt-1 text-xs text-gray-400",children:r.description})]})})}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between p-2 py-2",children:[e.jsxRuntimeExports.jsxs("button",{onClick:()=>S(r),className:"inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-blue-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:[e.jsxRuntimeExports.jsxs("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",className:"mr-2 h-4 w-4",children:[e.jsxRuntimeExports.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),t("view_data")]}),e.jsxRuntimeExports.jsx(A,{onRemove:()=>h(r),name:r.name,children:e.jsxRuntimeExports.jsxs("button",{className:"inline-flex h-9 items-center justify-center rounded-md px-3 text-xs font-medium text-red-500 underline-offset-4 ring-offset-background transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:[e.jsxRuntimeExports.jsxs("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",className:"mr-2 h-4 w-4",children:[e.jsxRuntimeExports.jsx("path",{d:"M3 6h18"}),e.jsxRuntimeExports.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsxRuntimeExports.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]}),t("remove")]})})]})]},r.providerKey))}),e.jsxRuntimeExports.jsx(D,{onClose:()=>f(null),provider:d})]})]})},B=i.lazy(()=>Promise.resolve().then(()=>require("./AddBlocks-nMUkm4og.cjs"))),y=i.lazy(()=>Promise.resolve().then(()=>require("./Layers-4r_4F6ST.cjs"))),z=i.lazy(()=>Promise.resolve().then(()=>require("./BrandingOptions-eeDfvB0R.cjs"))),I=i.lazy(()=>Promise.resolve().then(()=>require("./index-TEfD-2ti.cjs")).then(t=>t.ImagesPanel));let N=null;const K=()=>{const t=s.useBuilderProp("sideBarComponents.top",[]),x=s.useBuilderProp("sideBarComponents.bottom",[]),[n,l]=k.useAtom(s.activePanelAtom),[p,c]=i.useState(n),[u,E]=i.useState(null),v={"add-blocks":B,layers:y,"branding-options":z,images:I};a.each(t,({name:o,panel:h})=>{v[o]=h});const d=o=>{clearTimeout(N),n!=="layers"&&o==="layers"?N=setTimeout(()=>l("layers"),500):c(o),l(o)},f=s.useBuilderProp("dataBindingSupport",!1);function R(){const o=setTimeout(()=>{u&&(d("layers"),clearTimeout(u))},500);E(o)}return e.jsxRuntimeExports.jsxs("div",{className:"relative flex",children:[n!=="layers"?e.jsxRuntimeExports.jsx("div",{onMouseEnter:R,onClick:()=>d("layers"),className:"fixed inset-0 z-[50] bg-black/20"}):null,e.jsxRuntimeExports.jsxs("div",{className:"z-[100] flex h-full w-fit flex-col items-center justify-between border-b border-r border-border bg-background pt-2",children:[e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100] flex w-14 flex-col items-center space-y-2",children:[e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>{d("add-blocks")},size:"sm",variant:n==="add-blocks"?"default":"outline",children:e.jsxRuntimeExports.jsx(w.PlusIcon,{className:"text-xl"})}),e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d("layers"),size:"sm",variant:n==="layers"?"default":"outline",children:e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"w-4"})}),e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d("branding-options"),size:"sm",variant:n==="branding-options"?"default":"outline",children:e.jsxRuntimeExports.jsx(w.Half2Icon,{className:"w-4 max-w-[40px] text-xs"})}),i.Children.toArray(t.map(({name:o,icon:h})=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(s.Button,{onClick:()=>d(o),size:"sm",className:"w-10",variant:n===o?"default":"outline",children:e.jsxRuntimeExports.jsx(h,{})})})))]}),e.jsxRuntimeExports.jsx("div",{className:"relative z-[100] flex w-14 flex-col items-center space-y-2",children:i.Children.toArray(x.map(o=>e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsx(s.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(o,{})})))})]}),e.jsxRuntimeExports.jsx("div",{className:`absolute left-14 z-[50] h-full w-96 border-r bg-background duration-500 ease-in-out ${n!=="layers"?"translate-x-0":"-translate-x-full"}`,children:e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 bg-white p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:e.jsxRuntimeExports.jsx("div",{className:T.cn("relative h-full max-h-[93%] overflow-y-auto overflow-x-hidden bg-background p-1",n==="layers"?"":"z-[100]"),onMouseEnter:()=>{u&&clearTimeout(u)},children:i.createElement(a.get(v,n,()=>e.jsxRuntimeExports.jsx("div",{})))})})}),e.jsxRuntimeExports.jsx("div",{className:"h-full w-60 border-r p-1",children:e.jsxRuntimeExports.jsx(i.Suspense,{fallback:e.jsxRuntimeExports.jsxs("div",{className:"flex animate-pulse flex-col gap-y-2 p-4",children:[e.jsxRuntimeExports.jsx("div",{className:"h-6 w-1/2 bg-gray-300"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"}),e.jsxRuntimeExports.jsx("div",{className:"h-16 w-full bg-gray-200"})]}),children:f?e.jsxRuntimeExports.jsxs(s.Tabs,{defaultValue:"layers",className:"flex h-full w-full flex-col py-1",children:[e.jsxRuntimeExports.jsxs(s.TabsList,{className:"mx-1 grid h-10 grid-cols-2",children:[e.jsxRuntimeExports.jsxs(s.TabsTrigger,{value:"layers",children:[e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"mr-2 h-3"})," Layers"]}),e.jsxRuntimeExports.jsxs(s.TabsTrigger,{value:"data-provider",children:[e.jsxRuntimeExports.jsx(g.DatabaseIcon,{className:"mr-2 w-3"}),"Data"]})]}),e.jsxRuntimeExports.jsx(s.TabsContent,{value:"layers",className:"no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden",children:i.createElement(y)}),e.jsxRuntimeExports.jsx(s.TabsContent,{value:"data-provider",className:"flex-1 overflow-y-auto overflow-x-hidden",children:e.jsxRuntimeExports.jsx(_,{})})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center rounded-md bg-gray-200 py-1",children:[e.jsxRuntimeExports.jsx(g.ListTreeIcon,{className:"ml-2 mr-2 h-4"})," Layers"]}),e.jsxRuntimeExports.jsx("div",{className:"no-scrollbar h-full flex-1 overflow-y-auto overflow-x-hidden",children:i.createElement(y)})]})})})]})};exports.default=K;
@@ -2,13 +2,13 @@ import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import { PlusIcon as V, Half2Icon as M } from "@radix-ui/react-icons";
3
3
  import h, { useState as x, useEffect as H, useMemo as I, lazy as y, Suspense as j } from "react";
4
4
  import { useAtom as z } from "jotai";
5
- import { filter as g, map as _, isNull as L, find as F, isEmpty as R, each as J, get as O } from "lodash-es";
6
- import { ac as q, ad as U, ae as $, af as G, ag as Z, A as Q, z as W, C as X, D as Y, E as ee, F as se, G as re, H as ae, ah as le, o as te, q as ie, ai as oe, aj as ne, ak as ce, al as de, am as P, i as k, an as me, B as b, S, ao as xe, ap as pe, aq as T, ar as E } from "./index-pNYv0oAF.js";
5
+ import { filter as g, map as _, isNull as L, find as F, isEmpty as R, each as q, get as J } from "lodash-es";
6
+ import { ad as O, ae as U, af as $, ag as G, ah as Z, A as Q, z as W, C as X, D as Y, E as ee, F as se, G as re, H as ae, ai as le, o as te, q as ie, aj as oe, ak as ne, al as ce, am as de, an as P, i as k, ao as me, B as b, S, ap as xe, aq as pe, ar as T, as as E } from "./index-0m8Zuv5X.js";
7
7
  import { ListTreeIcon as C, DatabaseIcon as ue } from "lucide-react";
8
8
  import { getChaiDataProviders as he } from "@chaibuilder/runtime";
9
9
  import { useTranslation as A } from "react-i18next";
10
10
  import { J as fe, a as ve, d as je } from "./index-e0c8PmRQ.js";
11
- import { E as ge } from "./index-Fj3ead-J.js";
11
+ import { E as ge } from "./index-19nTm_cE.js";
12
12
  import { c as be } from "./Functions-7jnEwJyw.js";
13
13
  import "./_commonjsHelpers-UyOWmZb0.js";
14
14
  import "flat-to-nested";
@@ -56,7 +56,7 @@ const ye = ({ provider: r, onClose: i }) => {
56
56
  const { t: a } = A(), [t, p] = x(null);
57
57
  return H(() => {
58
58
  r && (r.mockFn ? r.mockFn : r.dataFn)().then((o) => p(o));
59
- }, [r]), r ? /* @__PURE__ */ e.jsx(q, { onOpenChange: (n) => n ? "" : i(), defaultOpen: !0, children: /* @__PURE__ */ e.jsxs(U, { children: [
59
+ }, [r]), r ? /* @__PURE__ */ e.jsx(O, { onOpenChange: (n) => n ? "" : i(), defaultOpen: !0, children: /* @__PURE__ */ e.jsxs(U, { children: [
60
60
  /* @__PURE__ */ e.jsxs($, { children: [
61
61
  /* @__PURE__ */ e.jsxs(G, { children: [
62
62
  a("data_provider"),
@@ -208,7 +208,7 @@ const Ne = () => {
208
208
  /* @__PURE__ */ e.jsx(ye, { onClose: () => v(null), provider: c })
209
209
  ] })
210
210
  ] });
211
- }, ke = y(() => import("./AddBlocks-TSt8uJY4.js")), D = y(() => import("./Layers-tXB5Pwid.js")), Ce = y(() => import("./BrandingOptions-uFTyYJZj.js")), De = y(() => import("./index-pNYv0oAF.js").then((r) => r.cp));
211
+ }, ke = y(() => import("./AddBlocks-ByeMUUzE.js")), D = y(() => import("./Layers-d-xge4On.js")), Ce = y(() => import("./BrandingOptions--poS5shs.js")), De = y(() => import("./index-0m8Zuv5X.js").then((r) => r.cq));
212
212
  let K = null;
213
213
  const As = () => {
214
214
  const r = k("sideBarComponents.top", []), i = k("sideBarComponents.bottom", []), [a, t] = z(me), [p, n] = x(a), [o, w] = x(null), f = {
@@ -217,7 +217,7 @@ const As = () => {
217
217
  "branding-options": Ce,
218
218
  images: De
219
219
  };
220
- J(r, ({ name: l, panel: u }) => {
220
+ q(r, ({ name: l, panel: u }) => {
221
221
  f[l] = u;
222
222
  });
223
223
  const c = (l) => {
@@ -308,7 +308,7 @@ const As = () => {
308
308
  onMouseEnter: () => {
309
309
  o && clearTimeout(o);
310
310
  },
311
- children: h.createElement(O(f, a, () => /* @__PURE__ */ e.jsx("div", {})))
311
+ children: h.createElement(J(f, a, () => /* @__PURE__ */ e.jsx("div", {})))
312
312
  }
313
313
  )
314
314
  }
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./jsx-runtime-WbnYoNE9.js";
2
2
  import o, { useMemo as m, Suspense as c } from "react";
3
3
  import { FontFamilyIcon as x } from "@radix-ui/react-icons";
4
- import { i as a, ai as d, aj as h, ak as u, al as j, as as g, at as v, am as r, a8 as f, au as S, av as b, B as N, aw as w, S as p, ax as C } from "./index-pNYv0oAF.js";
5
- import { useTranslation as y } from "react-i18next";
4
+ import { i as a, aj as d, ak as h, al as u, am as j, at as g, au as v, an as r, a9 as f, av as S, aw as b, B as N, ax as w, S as p, ay as y } from "./index-0m8Zuv5X.js";
5
+ import { useTranslation as C } from "react-i18next";
6
6
  import "./_commonjsHelpers-UyOWmZb0.js";
7
7
  import "lodash-es";
8
8
  import "./Functions-7jnEwJyw.js";
@@ -56,7 +56,7 @@ const A = () => a("languages", ["en"]), B = () => A().length === 1 ? null : /* @
56
56
  /* @__PURE__ */ e.jsx(r, { value: "pineapple", children: "Pineapple" })
57
57
  ] }) })
58
58
  ] }) }), T = () => {
59
- const { savePage: i, syncState: t } = f(), { t: l } = y(), n = m(() => {
59
+ const { savePage: i, syncState: t } = f(), { t: l } = C(), n = m(() => {
60
60
  switch (t) {
61
61
  case "SAVING":
62
62
  return "animate-pulse bg-gray-500 text-gray-900";
@@ -101,7 +101,7 @@ const A = () => a("languages", ["en"]), B = () => A().length === 1 ? null : /* @
101
101
  ) }),
102
102
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
103
103
  /* @__PURE__ */ e.jsx(B, {}),
104
- /* @__PURE__ */ e.jsx(C, { orientation: "vertical" }),
104
+ /* @__PURE__ */ e.jsx(y, { orientation: "vertical" }),
105
105
  n ? /* @__PURE__ */ e.jsx(T, {}) : null,
106
106
  o.Children.toArray(
107
107
  l.map((s) => /* @__PURE__ */ e.jsx(c, { fallback: /* @__PURE__ */ e.jsx(p, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(s, {}) }))
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),l=require("@radix-ui/react-icons"),r=require("./index-aiHDvS5v.cjs"),a=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");const o=()=>r.useBuilderProp("languages",["en"]),c=()=>o().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(l.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),p=()=>{const{savePage:i,syncState:s}=r.useSavePage(),{t:x}=a.useTranslation(),u=n.useMemo(()=>{switch(s){case"SAVING":return"animate-pulse bg-gray-500 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[s]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Tooltip,{children:[e.jsxRuntimeExports.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(r.Button,{onClick:t=>{t.preventDefault(),i()},className:`flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${u}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx("svg",{fill:"currentColor",width:"16",height:"16",viewBox:"0 0 0.32 0.32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"})}),s==="SAVING"?"Saving...":s==="SAVED"?x("Saved"):"Save"]})}),e.jsxRuntimeExports.jsx(r.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:s==="SAVING"?"Saving...":s==="SAVED"?"Saved":"Save changes"})})]})})},m=()=>{const i=r.useBuilderProp("topBarComponents.left",[]),s=r.useBuilderProp("topBarComponents.center",[]),x=r.useBuilderProp("topBarComponents.right",[]),u=r.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(c,{}),e.jsxRuntimeExports.jsx(r.Separator,{orientation:"vertical"}),u?e.jsxRuntimeExports.jsx(p,{}):null,n.Children.toArray(x.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-Z_BpKhVy.cjs"),n=require("react"),l=require("@radix-ui/react-icons"),r=require("./index-TEfD-2ti.cjs"),a=require("react-i18next");require("./_commonjsHelpers-wDK0ZLPo.cjs");require("lodash-es");require("./Functions-N3yhPYKY.cjs");require("clsx");require("tailwind-merge");require("@chaibuilder/runtime");require("jotai");require("flat-to-nested");require("./MODIFIERS-2FeVfZQ9.cjs");require("@react-hookz/web");require("@radix-ui/react-toggle");require("class-variance-authority");require("./Class-5ARpH_Tu.cjs");require("@radix-ui/react-switch");require("@radix-ui/react-slot");require("@radix-ui/react-accordion");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-dialog");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-menubar");require("@radix-ui/react-hover-card");require("@radix-ui/react-select");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-context-menu");require("react-icons-picker");require("react-dom");require("react-quill");const o=()=>r.useBuilderProp("languages",["en"]),c=()=>o().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(l.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),p=()=>{const{savePage:i,syncState:s}=r.useSavePage(),{t:x}=a.useTranslation(),u=n.useMemo(()=>{switch(s){case"SAVING":return"animate-pulse bg-gray-500 text-gray-900";case"SAVED":return"bg-green-500 text-white hover:bg-green-600 hover:text-white";default:return"bg-gray-200 text-gray-500 hover:bg-gray-100"}},[s]);return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Tooltip,{children:[e.jsxRuntimeExports.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(r.Button,{onClick:t=>{t.preventDefault(),i()},className:`flex h-auto w-20 items-center gap-x-1 rounded-full p-1 px-2 ${u}`,size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx("svg",{fill:"currentColor",width:"16",height:"16",viewBox:"0 0 0.32 0.32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M.274.086a.02.02 0 0 1 0 .028l-.12.12a.02.02 0 0 1-.028 0l-.06-.06A.02.02 0 0 1 .094.146L.14.192.246.086a.02.02 0 0 1 .028 0Z"})}),s==="SAVING"?"Saving...":s==="SAVED"?x("Saved"):"Save"]})}),e.jsxRuntimeExports.jsx(r.TooltipContent,{children:e.jsxRuntimeExports.jsx("p",{children:s==="SAVING"?"Saving...":s==="SAVED"?"Saved":"Save changes"})})]})})},m=()=>{const i=r.useBuilderProp("topBarComponents.left",[]),s=r.useBuilderProp("topBarComponents.center",[]),x=r.useBuilderProp("topBarComponents.right",[]),u=r.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:n.Children.toArray(i.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:n.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxRuntimeExports.jsx(c,{}),e.jsxRuntimeExports.jsx(r.Separator,{orientation:"vertical"}),u?e.jsxRuntimeExports.jsx(p,{}):null,n.Children.toArray(x.map(t=>e.jsxRuntimeExports.jsx(n.Suspense,{fallback:e.jsxRuntimeExports.jsx(r.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=m;